OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ProtoChoice< Derived > Class Template Reference

#include <proto.h>

Inheritance diagram for ProtoChoice< Derived >:
Collaboration diagram for ProtoChoice< Derived >:

Classes

struct  ChoiceEncoder
 
struct  ChoiceMatcher
 

Static Public Member Functions

template<typename T >
static int Parse (const uint8_t *data, size_t size, ParseContext *context, T *obj)
 
template<typename T >
static int Encode (EncodeContext *context, const T *msg, uint8_t *data, size_t size)
 
- Static Public Member Functions inherited from ElementBase
static bool Verifier (const void *obj, const uint8_t *data, size_t size, ParseContext *context)
 

Static Private Member Functions

template<typename T >
static int ParseChoice (const uint8_t *data, size_t size, int value, ParseContext *context, T *obj)
 

Additional Inherited Members

- Public Types inherited from ChoiceBase
typedef void ContextStorer
 
- Public Types inherited from ElementBase
typedef void SaveOffset
 
typedef void ContextType
 
typedef NullCtxInit ContextInit
 
typedef NoMatch ContextMatch
 
typedef void Setter
 
typedef void EncodingCallback
 
typedef void ContextSwap
 
typedef void SizeSetter
 
- Static Public Attributes inherited from ElementBase
static const int kSize = 0
 
static const int kErrorCode = 0
 
static const int kErrorSubcode = 0
 

Detailed Description

template<class Derived>
class ProtoChoice< Derived >

Definition at line 349 of file src/contrail-common/base/proto.h.

Member Function Documentation

template<class Derived>
template<typename T >
static int ProtoChoice< Derived >::Encode ( EncodeContext context,
const T *  msg,
uint8_t *  data,
size_t  size 
)
inlinestatic

Definition at line 392 of file src/contrail-common/base/proto.h.

template<class Derived>
template<typename T >
static int ProtoChoice< Derived >::Parse ( const uint8_t *  data,
size_t  size,
ParseContext context,
T *  obj 
)
inlinestatic

Definition at line 352 of file src/contrail-common/base/proto.h.

template<class Derived>
template<typename T >
static int ProtoChoice< Derived >::ParseChoice ( const uint8_t *  data,
size_t  size,
int  value,
ParseContext context,
T *  obj 
)
inlinestaticprivate

Definition at line 429 of file src/contrail-common/base/proto.h.


The documentation for this class was generated from the following file: