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_Blockserialized_
bool swap_
bool cdr_

Detailed Description

Definition at line 142 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 143 of file FilterEvaluator.h.

00145       : 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 110 of file FilterEvaluator.cpp.

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

00111 {
00112   const OPENDDS_MAP(OPENDDS_STRING, Value)::const_iterator iter = cache_.find(field);
00113   if (iter != cache_.end()) {
00114     return iter->second;
00115   }
00116   Message_Block_Ptr mb (serialized_->duplicate());
00117   Serializer ser(mb.get(), swap_,
00118                  cdr_ ? Serializer::ALIGN_CDR : Serializer::ALIGN_NONE);
00119   if (cdr_) {
00120     ser.skip(4); // CDR encapsulation header
00121   }
00122   const Value v = meta_.getValue(ser, field);
00123   cache_.insert(std::make_pair(OPENDDS_STRING(field), v));
00124   return v;
00125 }

Here is the call graph for this function:

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

Referenced by lookup().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 148 of file FilterEvaluator.h.

Referenced by lookup().

Definition at line 147 of file FilterEvaluator.h.

Referenced by lookup().

Definition at line 148 of file FilterEvaluator.h.

Referenced by lookup().


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1