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

This class defines an entry in the XML dictionary. More...

#include <evioDictEntry.hxx>

Public Member Functions

 evioDictEntry ()
 Zero arg constructor. More...
 
 evioDictEntry (uint16_t tag)
 Constructor for tag-only entry. More...
 
 evioDictEntry (uint16_t tag, uint8_t num, uint16_t tagEnd)
 Constructor for tag-range entry. More...
 
 evioDictEntry (uint16_t tag, uint8_t num)
 Constructor for tag and num entry. More...
 
 evioDictEntry (uint16_t tag, uint8_t num, uint16_t tagEnd, DataType type, bool numIsUndefined=false, string format="", string description="")
 General constructor. More...
 
 evioDictEntry (uint16_t tag, uint8_t num, uint16_t tagEnd, bool hasParent, uint16_t parentTag, uint8_t parentNum, uint16_t parentTagEnd, DataType type, bool numIsUndefined=false, string format="", string description="")
 General constructor. More...
 
 evioDictEntry (const evioDictEntry &entry)
 Copy constructor. More...
 
virtual ~evioDictEntry ()
 Destructor. More...
 
uint16_t getTag (void) const
 Get the tag value of this entry. More...
 
uint16_t getTagEnd (void) const
 Get the ending value of a tag range defined by this entry. More...
 
uint8_t getNum (void) const
 Get the num value of this entry. More...
 
bool isNumUndefined (void) const
 Get whether num is undefined. More...
 
DataType getType (void) const
 Get the data type of this entry. More...
 
DictEntryType getEntryType (void) const
 Get the type of this entry. More...
 
string getFormat (void) const
 Get the string describing the data format of this entry. More...
 
string getDescription (void) const
 Get the string describing the data of this entry. More...
 
uint16_t getParentTag (void) const
 Get the tag of parent entry if any. More...
 
uint16_t getParentTagEnd (void) const
 Get the tagEnd of parent entry if any. More...
 
uint8_t getParentNum (void) const
 Get the num of parent entry if any. More...
 
bool hasParent (void) const
 Does this entry have a valid parent entry? More...
 
string toString (void) const throw (evioException)
 Create a string representation of this object. More...
 
bool inRange (uint16_t tagArg)
 Is the given tag within the specified range (inclusive) of this dictionary entry? More...
 
bool operator== (const evioDictEntry &tn) const
 
bool operator< (const evioDictEntry &tn) const
 

Static Public Member Functions

static DataType getDataType (const char *type)
 Given a string data type, return the equivalent DataType enum. More...
 

Friends

class evioDictionary
 

Detailed Description

This class defines an entry in the XML dictionary.

Constructor & Destructor Documentation

evioDictEntry::evioDictEntry ( )

Zero arg constructor.

References evio::EVIO_UNKNOWN32.

evioDictEntry::evioDictEntry ( uint16_t  tag)
explicit

Constructor for tag-only entry.

Parameters
tagtag

References evio::EVIO_UNKNOWN32.

evioDictEntry::evioDictEntry ( uint16_t  tag,
uint8_t  num,
uint16_t  tagEnd 
)

Constructor for tag-range entry.

If tag > tagEnd, these values are switched.

Parameters
tagbeginning tag of range
numnum is used only to differentiate this from the tag-num constructor.
tagEndending tag of range

References evio::EVIO_UNKNOWN32.

evioDictEntry::evioDictEntry ( uint16_t  tag,
uint8_t  num 
)

Constructor for tag and num entry.

Parameters
tagtag
numnum

References evio::EVIO_UNKNOWN32.

evioDictEntry::evioDictEntry ( uint16_t  tag,
uint8_t  num,
uint16_t  tagEnd,
DataType  type,
bool  numIsUndefined = false,
string  format = "",
string  description = "" 
)

General constructor.

If tag > tagEnd, these values are switched.

Parameters
tagtag or the beginning tag of a range.
numnum.
tagEndending tag of a range. Set to 0 or same value as tag if no range desired.
typetype of evio data contained in evio structure this entry represents.
numIsUndefinedif desiring a tag-range or tag-only entry, set this to
true
, else
false
. Defaults to false.
formatstring describing data format. Defaults to "".
descriptionstring describing data. Defaults to "".
evioDictEntry::evioDictEntry ( uint16_t  tag,
uint8_t  num,
uint16_t  tagEnd,
bool  hasParent,
uint16_t  parentTag,
uint8_t  parentNum,
uint16_t  parentTagEnd,
DataType  type,
bool  numIsUndefined = false,
string  format = "",
string  description = "" 
)

General constructor.

If tag > tagEnd, these values are switched.

Parameters
tagtag or the beginning tag of a range.
numnum.
tagEndending tag of a range. Set to 0 or same value as tag if no range desired.
typetype of evio data contained in evio structure this entry represents.
numIsUndefinedif desiring a tag-range or tag-only entry, set this to
true
, else
false
. Defaults to false.
formatstring describing data format. Defaults to "".
descriptionstring describing data. Defaults to "".
evioDictEntry::evioDictEntry ( const evioDictEntry entry)

Copy constructor.

evioDictEntry::~evioDictEntry ( )
virtual

Destructor.

Member Function Documentation

DataType evioDictEntry::getDataType ( const char *  type)
static

Given a string data type, return the equivalent DataType enum.

type data type string of "unknown32", "uint32", ... "bank", "segment".

Returns
DataType enum equivalent of arg.

References evio::EVIO_UNKNOWN32.

Referenced by evio::evioDictionary::startElementHandler().

string evioDictEntry::getDescription ( void  ) const

Get the string describing the data of this entry.

Since
5.2
Returns
description.

Referenced by evio::evioDictionary::toString().

DictEntryType evioDictEntry::getEntryType ( void  ) const

Get the type of this entry.

Since
5.2
Returns
DictEntryType enum specify a tag & num, only a tag, or a tag range.

Referenced by evio::evioDictionary::charDataHandler(), evio::evioDictionary::getName(), and evio::evioDictionary::startElementHandler().

string evioDictEntry::getFormat ( void  ) const

Get the string describing the data format of this entry.

Since
5.2
Returns
format.

Referenced by evio::evioDictionary::toString().

uint8_t evioDictEntry::getParentNum ( void  ) const

Get the num of parent entry if any.

Returns
parent num.
uint16_t evioDictEntry::getParentTag ( void  ) const

Get the tag of parent entry if any.

Returns
parent tag.
uint16_t evioDictEntry::getParentTagEnd ( void  ) const

Get the tagEnd of parent entry if any.

Returns
parent tagEnd.
uint16_t evioDictEntry::getTagEnd ( void  ) const

Get the ending value of a tag range defined by this entry.

Since
5.2
Returns
tagEnd.
DataType evioDictEntry::getType ( void  ) const

Get the data type of this entry.

Since
5.2
Returns
DataType enum describing type of data.
bool evioDictEntry::hasParent ( void  ) const

Does this entry have a valid parent entry?

Returns
true if valid parent entry, else false.
bool evioDictEntry::inRange ( uint16_t  tagArg)

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 or this entry does not define a range, else
true
.

References evio::TAG_RANGE.

Referenced by evio::evioDictionary::getName().

bool evioDictEntry::isNumUndefined ( void  ) const

Get whether num is undefined.

Since
5.2
Returns
true if tag-only or tag-range, else false.
bool evio::evioDictEntry::operator< ( const evioDictEntry tn) const
inline
bool evio::evioDictEntry::operator== ( const evioDictEntry tn) const
inline
string evioDictEntry::toString ( void  ) const
throw (evioException
)

Create a string representation of this object.

Returns
string representation of this object.

Friends And Related Function Documentation

friend class evioDictionary
friend

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