OpenDDS::DCPS::FilterEvaluator::SerializedForEval Struct Reference

Inheritance diagram for OpenDDS::DCPS::FilterEvaluator::SerializedForEval:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::FilterEvaluator::SerializedForEval:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SerializedForEval (ACE_Message_Block *data, const MetaStruct &meta, const DDS::StringSeq &params, bool swap, bool cdr)
Value lookup (const char *field) const
 OPENDDS_MAP (OPENDDS_STRING, Value) cache_

Public Attributes

ACE_Message_Block * serialized_
bool swap_
bool cdr_

Detailed Description

Definition at line 138 of file FilterEvaluator.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::FilterEvaluator::SerializedForEval::SerializedForEval ( ACE_Message_Block *  data,
const MetaStruct meta,
const DDS::StringSeq params,
bool  swap,
bool  cdr 
) [inline]

Definition at line 139 of file FilterEvaluator.h.

00141       : DataForEval(meta, params), serialized_(data), swap_(swap), cdr_(cdr) {}


Member Function Documentation

Value OpenDDS::DCPS::FilterEvaluator::SerializedForEval::lookup ( const char *  field  )  const [virtual]

Implements OpenDDS::DCPS::FilterEvaluator::DataForEval.

Definition at line 115 of file FilterEvaluator.cpp.

References OpenDDS::DCPS::Serializer::ALIGN_CDR, OpenDDS::DCPS::Serializer::ALIGN_NONE, cdr_, OpenDDS::DCPS::MetaStruct::getValue(), OpenDDS::DCPS::FilterEvaluator::DataForEval::meta_, OPENDDS_MAP(), OPENDDS_STRING, serialized_, OpenDDS::DCPS::Serializer::skip(), and swap_.

00116 {
00117   const OPENDDS_MAP(OPENDDS_STRING, Value)::const_iterator iter = cache_.find(field);
00118   if (iter != cache_.end()) {
00119     return iter->second;
00120   }
00121   ACE_Message_Block* const mb = serialized_->duplicate();
00122   AMB_Releaser release(mb);
00123   Serializer ser(mb, swap_,
00124                  cdr_ ? Serializer::ALIGN_CDR : Serializer::ALIGN_NONE);
00125   if (cdr_) {
00126     ser.skip(4); // CDR encapsulation header
00127   }
00128   const Value v = meta_.getValue(ser, field);
00129   cache_.insert(std::make_pair(OPENDDS_STRING(field), v));
00130   return v;
00131 }

OpenDDS::DCPS::FilterEvaluator::SerializedForEval::OPENDDS_MAP ( OPENDDS_STRING  ,
Value   
) [mutable]

Referenced by lookup().


Member Data Documentation

bool OpenDDS::DCPS::FilterEvaluator::SerializedForEval::cdr_

Definition at line 144 of file FilterEvaluator.h.

Referenced by lookup().

ACE_Message_Block* OpenDDS::DCPS::FilterEvaluator::SerializedForEval::serialized_

Definition at line 143 of file FilterEvaluator.h.

Referenced by lookup().

bool OpenDDS::DCPS::FilterEvaluator::SerializedForEval::swap_

Definition at line 144 of file FilterEvaluator.h.

Referenced by lookup().


The documentation for this struct was generated from the following files:
Generated on Fri Feb 12 20:06:17 2016 for OpenDDS by  doxygen 1.4.7