DCCL v3
Public Member Functions | List of all members
dccl::internal::FromProtoCppTypeBase Class Reference

Provides various representations of a google::protobuf::FieldDescriptor::CppType enumeration, and ways to access the google::protobuf::Reflection object for a given type. More...

#include <dccl/internal/protobuf_cpp_type_helpers.h>

Inheritance diagram for dccl::internal::FromProtoCppTypeBase:
Inheritance graph
[legend]

Public Member Functions

virtual std::string as_str ()
 string representation
 
boost::any get_value (const google::protobuf::FieldDescriptor *field, const google::protobuf::Message &msg)
 Get a given field's value from the provided message. More...
 
boost::any get_value (const google::protobuf::Message &msg)
 Get the value of the entire base message (only works for CPPTYPE_MESSAGE)
 
boost::any get_repeated_value (const google::protobuf::FieldDescriptor *field, const google::protobuf::Message &msg, int index)
 Get the value of a repeated field at a given index. More...
 
void set_value (const google::protobuf::FieldDescriptor *field, google::protobuf::Message *msg, boost::any value)
 Set a given field's value in the provided message. More...
 
void set_value (google::protobuf::Message *msg, boost::any value)
 Set the value of the entire base message (only works for CPPTYPE_MESSAGE)
 
void add_value (const google::protobuf::FieldDescriptor *field, google::protobuf::Message *msg, boost::any value)
 Add a new entry for a repeated field to the back. More...
 
virtual void _set_value (const google::protobuf::FieldDescriptor *field, google::protobuf::Message *msg, boost::any value)
 
virtual void _add_value (const google::protobuf::FieldDescriptor *field, google::protobuf::Message *msg, boost::any value)
 
virtual boost::any _get_repeated_value (const google::protobuf::FieldDescriptor *field, const google::protobuf::Message &msg, int index)
 
virtual boost::any _get_value (const google::protobuf::FieldDescriptor *field, const google::protobuf::Message &msg)
 

Detailed Description

Provides various representations of a google::protobuf::FieldDescriptor::CppType enumeration, and ways to access the google::protobuf::Reflection object for a given type.

Definition at line 54 of file protobuf_cpp_type_helpers.h.

Member Function Documentation

void dccl::internal::FromProtoCppTypeBase::add_value ( const google::protobuf::FieldDescriptor *  field,
google::protobuf::Message msg,
boost::any  value 
)
inline

Add a new entry for a repeated field to the back.

Parameters
msgMessage to set value in.
Returns
boost::any containing the value. The type is usually the type returned by google::protobuf::Reflection::Add<i>Type where Type is the corresponding google::protobuf::FieldDescriptor::CppType. (See http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Reflection).

Definition at line 125 of file protobuf_cpp_type_helpers.h.

boost::any dccl::internal::FromProtoCppTypeBase::get_repeated_value ( const google::protobuf::FieldDescriptor *  field,
const google::protobuf::Message msg,
int  index 
)
inline

Get the value of a repeated field at a given index.

Parameters
fieldField to get value for.
msgMessage to get value from.
indexIndex of the repeated array to get value for.
Returns
boost::any containing the value. The type is usually the type returned by google::protobuf::Reflection::Get<i>Type where Type is the corresponding google::protobuf::FieldDescriptor::CppType. (See http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Reflection).

Definition at line 89 of file protobuf_cpp_type_helpers.h.

boost::any dccl::internal::FromProtoCppTypeBase::get_value ( const google::protobuf::FieldDescriptor *  field,
const google::protobuf::Message msg 
)
inline

Get a given field's value from the provided message.

Parameters
fieldField to get value for.
msgMessage to get value from.
Returns
boost::any containing the value. The type is usually the type returned by google::protobuf::Reflection::Get<i>Type where Type is the corresponding google::protobuf::FieldDescriptor::CppType. (See http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Reflection).

Definition at line 67 of file protobuf_cpp_type_helpers.h.

void dccl::internal::FromProtoCppTypeBase::set_value ( const google::protobuf::FieldDescriptor *  field,
google::protobuf::Message msg,
boost::any  value 
)
inline

Set a given field's value in the provided message.

Parameters
fieldField to set value for.
msgMessage to set value in.
valueboost::any containing the value to set. The type is usually the type required by google::protobuf::Reflection::Set<i>Type where Type is the corresponding google::protobuf::FieldDescriptor::CppType. (See http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Reflection).

Definition at line 101 of file protobuf_cpp_type_helpers.h.


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