evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
evio::EvioDictionaryEntry Class Reference

Class to facilitate use of Evio XML dictionary entry data as a key or value in a hash table. More...

#include <EvioDictionaryEntry.h>

Public Types

enum  EvioDictionaryEntryType { TAG_NUM = 0, TAG_ONLY = 1, TAG_RANGE = 2 }
 Type of dictionary entry. More...
 

Public Member Functions

 EvioDictionaryEntry (uint16_t tag, uint8_t num, DataType const &type)
 Constructor. More...
 
 EvioDictionaryEntry (uint16_t tag, uint16_t tagEnd=0, DataType const &type=DataType::UNKNOWN32, std::string const &description="", std::string const &format="", std::shared_ptr< EvioDictionaryEntry > parent=nullptr)
 Constructor containing actual implementation. More...
 
 EvioDictionaryEntry (uint16_t tag, uint8_t num, uint16_t tagEnd=0, DataType const &type=DataType::UNKNOWN32, std::string const &description="", std::string const &format="", std::shared_ptr< EvioDictionaryEntry > parent=nullptr)
 Constructor containing actual implementation. More...
 
bool inRange (uint16_t tagArg) const
 Is the given tag within the specified range (inclusive) of this dictionary entry? More...
 
bool inRange (EvioDictionaryEntry &entry) const
 Is the given dictionary entry's tag within the specified range (inclusive) of this dictionary entry? More...
 
bool operator== (const EvioDictionaryEntry &other) const
 
bool operator!= (const EvioDictionaryEntry &rhs) const
 
std::string toString () const
 Get a string representation of this object. More...
 
uint16_t getTag () const
 Get the tag value. More...
 
uint16_t getTagEnd () const
 Get the tagEnd value (upper end of a tag range). More...
 
uint8_t getNum () const
 Get the num value. More...
 
DataType getType () const
 Get the data's type. More...
 
std::string getFormat () const
 Get the CompositeData's format. More...
 
std::string getDescription () const
 Get the CompositeData's description. More...
 
EvioDictionaryEntryType getEntryType () const
 Get this entry's type. More...
 
std::shared_ptr
< EvioDictionaryEntry
getParentEntry () const
 Get the parent container's dictionary entry. More...
 
std::string toString ()
 Get the string representation of this object. More...
 

Friends

class EvioXMLDictionary
 

Detailed Description

Class to facilitate use of Evio XML dictionary entry data as a key or value in a hash table.

(8/17/15).

Author
timmer.

Member Enumeration Documentation

Type of dictionary entry.

Is it just a tag? a tag and tag range but no num? or a tag & num with a possible tag range?

Enumerator
TAG_NUM 

Valid tag & num, with or without a tagEnd.

TAG_ONLY 

Valid tag, but no num or tagEnd.

TAG_RANGE 

Valid tag and tagEnd, but no num.

Constructor & Destructor Documentation

evio::EvioDictionaryEntry::EvioDictionaryEntry ( uint16_t  tag,
uint8_t  num,
DataType const &  type 
)
inline

Constructor.

Parameters
tagtag value of evio container.
numnum value of evio container.
typetype of data in evio container which may be (case-independent): DataType#UNKNOWN32 ... DataType#COMPOSITE.
evio::EvioDictionaryEntry::EvioDictionaryEntry ( uint16_t  tag,
uint16_t  tagEnd = 0,
DataType const &  type = DataType::UNKNOWN32,
std::string const &  description = "",
std::string const &  format = "",
std::shared_ptr< EvioDictionaryEntry parent = nullptr 
)
inlineexplicit

Constructor containing actual implementation.

Caller assumes responsibility of supplying correct arg values. If tag > tagEnd, these values are switched so tag < tagEnd. Num is ignored.

Parameters
tagtag value or low end of a tag range of an evio container.
tagEndif > 0, this is the high end of a tag range.
typetype of data in evio container which may be: DataType#UNKNOWN32 ... DataType#COMPOSITE.
descriptiondescription of CompositeData
formatformat of CompositeData
parentparent dictionary entry object
evio::EvioDictionaryEntry::EvioDictionaryEntry ( uint16_t  tag,
uint8_t  num,
uint16_t  tagEnd = 0,
DataType const &  type = DataType::UNKNOWN32,
std::string const &  description = "",
std::string const &  format = "",
std::shared_ptr< EvioDictionaryEntry parent = nullptr 
)
inlineexplicit

Constructor containing actual implementation.

Caller assumes responsibility of supplying correct arg values. If tag > tagEnd, these values are switched so tag < tagEnd.

Parameters
tagtag value or low end of a tag range of an evio container.
numnum value of evio container.
tagEndif > 0, this is the high end of a tag range.
typetype of data in evio container which may be: DataType#UNKNOWN32 ... DataType#COMPOSITE.
descriptiondescription of CompositeData
formatformat of CompositeData
parentparent dictionary entry object

Member Function Documentation

std::string evio::EvioDictionaryEntry::getDescription ( ) const
inline

Get the CompositeData's description.

Returns
CompositeData's description, empty if nonexistent.
EvioDictionaryEntryType evio::EvioDictionaryEntry::getEntryType ( ) const
inline

Get this entry's type.

Returns
this entry's type.
std::string evio::EvioDictionaryEntry::getFormat ( ) const
inline

Get the CompositeData's format.

Returns
CompositeData's format, empty if nonexistent.
uint8_t evio::EvioDictionaryEntry::getNum ( ) const
inline

Get the num value.

Returns
num value.
std::shared_ptr<EvioDictionaryEntry> evio::EvioDictionaryEntry::getParentEntry ( ) const
inline

Get the parent container's dictionary entry.

Returns
the parent container's dictionary entry, null if nonexistent.

Referenced by operator==().

uint16_t evio::EvioDictionaryEntry::getTag ( ) const
inline

Get the tag value.

This is the low end of a tag range if tagEnd > 0.

Returns
tag value.
uint16_t evio::EvioDictionaryEntry::getTagEnd ( ) const
inline

Get the tagEnd value (upper end of a tag range).

A value of 0 means there is no range.

Returns
tagEnd value.
DataType evio::EvioDictionaryEntry::getType ( ) const
inline

Get the data's type.

Returns
data type object, null if nonexistent.
bool evio::EvioDictionaryEntry::inRange ( uint16_t  tagArg) const
inline

Is the given tag within the specified range (inclusive) of this dictionary entry?

Since
5.2
Parameters
tagArgtag to compare with range
Returns
false
if tag not in range, else
true
.
bool evio::EvioDictionaryEntry::inRange ( EvioDictionaryEntry entry) const
inline

Is the given dictionary entry's tag within the specified range (inclusive) of this dictionary entry?

Since
5.2
Parameters
entrydictionary entry to compare with range
Returns
false
if tag not in range, else
true
.
bool evio::EvioDictionaryEntry::operator!= ( const EvioDictionaryEntry rhs) const
inline
bool evio::EvioDictionaryEntry::operator== ( const EvioDictionaryEntry other) const
inline

References getParentEntry().

std::string evio::EvioDictionaryEntry::toString ( ) const
inline

Get a string representation of this object.

Returns
a string representation of this object.

References TAG_NUM, TAG_ONLY, and TAG_RANGE.

std::string evio::EvioDictionaryEntry::toString ( )
inline

Get the string representation of this object.

Returns
string representation of this object.

References TAG_NUM, TAG_ONLY, and TAG_RANGE.

Friends And Related Function Documentation

friend class EvioXMLDictionary
friend

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