Public Member Functions | |
SerializedForEval (ACE_Message_Block *data, const MetaStruct &meta, const DDS::StringSeq ¶ms, 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_ |
Definition at line 138 of file FilterEvaluator.h.
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) {}
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().
ACE_Message_Block* OpenDDS::DCPS::FilterEvaluator::SerializedForEval::serialized_ |