A helper class to index into arguments.
More...
#include <proto_utils.h>
|
| ArgumentHelper (const OperatorDef &def) |
|
| ArgumentHelper (const NetDef &netdef) |
|
bool | HasArgument (const string &name) const |
|
template<typename T > |
T | GetSingleArgument (const string &name, const T &default_value) const |
|
template<typename T > |
bool | HasSingleArgumentOfType (const string &name) const |
|
template<typename T > |
vector< T > | GetRepeatedArgument (const string &name, const std::vector< T > &default_value=std::vector< T >()) const |
|
template<typename MessageType > |
MessageType | GetMessageArgument (const string &name) const |
|
template<typename MessageType > |
vector< MessageType > | GetRepeatedMessageArgument (const string &name) const |
|
|
template<typename Def > |
static bool | HasArgument (const Def &def, const string &name) |
|
template<typename Def , typename T > |
static T | GetSingleArgument (const Def &def, const string &name, const T &default_value) |
|
template<typename Def , typename T > |
static bool | HasSingleArgumentOfType (const Def &def, const string &name) |
|
template<typename Def , typename T > |
static vector< T > | GetRepeatedArgument (const Def &def, const string &name, const std::vector< T > &default_value=std::vector< T >()) |
|
template<typename Def , typename MessageType > |
static MessageType | GetMessageArgument (const Def &def, const string &name) |
|
template<typename Def , typename MessageType > |
static vector< MessageType > | GetRepeatedMessageArgument (const Def &def, const string &name) |
|
A helper class to index into arguments.
This helper helps us to more easily index into a set of arguments that are present in the operator. To save memory, the argument helper does not copy the operator def, so one would need to make sure that the lifetime of the OperatorDef object outlives that of the ArgumentHelper.
Definition at line 198 of file proto_utils.h.
The documentation for this class was generated from the following files: