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

Numerical values associated with evio structure types. More...

#include <StructureType.h>

Public Member Functions

const std::string & getName () const
 Get the name associated with this structure type. More...
 
uint32_t getValue () const
 Get the integer value associated with this structure type. More...
 
std::string toString ()
 Return a string which is usually the same as the name of the enumerated value, except in the cases of ALSOSEGMENT and ALSOBANK which return SEGMENT and BANK respectively. More...
 
bool isBank ()
 Convenience routine to see if "this" structure type is a bank structure. More...
 
bool isSegment ()
 Convenience routine to see if "this" structure type is a segment structure. More...
 
bool isTagSegment ()
 Convenience routine to see if "this" structure type is a tagsegment structure. More...
 
bool operator== (const StructureType &rhs) const
 
bool operator!= (const StructureType &rhs) const
 

Static Public Member Functions

static const StructureTypegetStructureType (uint32_t val)
 Get the object from the integer value. More...
 
static std::string getName (uint32_t val)
 Get the name from the integer value. More...
 
static bool isBank (uint32_t type)
 Convenience method to see if the given integer arg represents a BANK. More...
 
static bool isSegment (uint32_t type)
 Convenience method to see if the given integer arg represents a SEGMENT. More...
 
static bool isTagSegment (uint32_t type)
 Convenience method to see if the given integer arg represents a TAGSEGMENT. More...
 

Static Public Attributes

static const StructureType STRUCT_UNKNOWN32 = StructureType("UNKNOWN32", 0)
 Unknown data type. More...
 
static const StructureType STRUCT_TAGSEGMENT = StructureType("TAGSEGMENT", 0xc)
 Tag segment. More...
 
static const StructureType STRUCT_SEGMENT = StructureType("SEGMENT", 0x20, 0xd)
 Segment. More...
 
static const StructureType STRUCT_BANK = StructureType("BANK", 0x10, 0xe)
 Bank. More...
 

Detailed Description

Numerical values associated with evio structure types.

This class approximates the Java enum it was copied from. This class converts structure type numerical values to a more meaningful name. For example, the structure type with value 0xe corresponds to a BANK. This is mostly used for printing.

Author
heddle
timmer
Version
6.0
Since
6.0 4/13/2020

Member Function Documentation

static std::string evio::StructureType::getName ( uint32_t  val)
inlinestatic

Get the name from the integer value.

Parameters
valthe value to match.
Returns
the name, or null.

References getStructureType().

const std::string& evio::StructureType::getName ( ) const
inline

Get the name associated with this structure type.

Returns
name associated with this structure type.
static const StructureType& evio::StructureType::getStructureType ( uint32_t  val)
inlinestatic

Get the object from the integer value.

Parameters
valthe value to match.
Returns
the matching StructureType object.

References STRUCT_UNKNOWN32.

Referenced by getName().

uint32_t evio::StructureType::getValue ( ) const
inline

Get the integer value associated with this structure type.

Returns
integer value associated with this structure type.
static bool evio::StructureType::isBank ( uint32_t  type)
inlinestatic

Convenience method to see if the given integer arg represents a BANK.

Parameters
typethe int value to match.
Returns
true if the structure type corresponds to a BANK.

References STRUCT_BANK.

bool evio::StructureType::isBank ( )
inline

Convenience routine to see if "this" structure type is a bank structure.

Returns
true if this structure type corresponds to a bank structure.

References STRUCT_BANK.

static bool evio::StructureType::isSegment ( uint32_t  type)
inlinestatic

Convenience method to see if the given integer arg represents a SEGMENT.

Parameters
typethe int value to match.
Returns
true if the structure type corresponds to a SEGMENT.

References STRUCT_SEGMENT.

bool evio::StructureType::isSegment ( )
inline

Convenience routine to see if "this" structure type is a segment structure.

Returns
true if this structure type corresponds to a segment structure.

References STRUCT_SEGMENT.

static bool evio::StructureType::isTagSegment ( uint32_t  type)
inlinestatic

Convenience method to see if the given integer arg represents a TAGSEGMENT.

Parameters
typethe int value to match.
Returns
true if the structure type corresponds to a TAGSEGMENT.

References STRUCT_TAGSEGMENT.

bool evio::StructureType::isTagSegment ( )
inline

Convenience routine to see if "this" structure type is a tagsegment structure.

Returns
true if this structure type corresponds to a tagsegment structure.

References STRUCT_TAGSEGMENT.

bool evio::StructureType::operator!= ( const StructureType rhs) const
bool evio::StructureType::operator== ( const StructureType rhs) const
std::string evio::StructureType::toString ( )
inline

Return a string which is usually the same as the name of the enumerated value, except in the cases of ALSOSEGMENT and ALSOBANK which return SEGMENT and BANK respectively.

Returns
name of the enumerated type

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

Member Data Documentation

const StructureType evio::StructureType::STRUCT_SEGMENT = StructureType("SEGMENT", 0x20, 0xd)
static
const StructureType evio::StructureType::STRUCT_TAGSEGMENT = StructureType("TAGSEGMENT", 0xc)
static
const StructureType evio::StructureType::STRUCT_UNKNOWN32 = StructureType("UNKNOWN32", 0)
static

Unknown data type.

Referenced by getStructureType(), and evio::BaseStructure::getStructureType().


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