LRAUV  revA
ElementURI Class Reference

Code unit that represents a unique name for a DataElement. More...

#include <ElementURI.h>

Inheritance diagram for ElementURI:
Collaboration diagram for ElementURI:

Public Types

enum  ElementType {
  BASE_ELEMENT = 0, CONFIG_ELEMENT = 1, DATA_ELEMENT = 2, SETTING_ELEMENT = 3,
  UNIVERSAL_ELEMENT = 4, BLOB_VALUE_FLAG = 0x10
}
 

Public Member Functions

 ElementURI (const char *component, const char *elementName, ElementType=BASE_ELEMENT, const Unit &unit=UNSPECIFIED_UNIT, BinaryDataType binaryType=NO_TYPE, BlobType blobType=NOT_BLOB, unsigned short dimension1=0, unsigned short dimension2=0, unsigned short dimension3=0)
 
 ElementURI (const Str &component, const char *elementName, ElementType=BASE_ELEMENT, const Unit &unit=UNSPECIFIED_UNIT, BinaryDataType binaryType=NO_TYPE, BlobType blobType=NOT_BLOB, unsigned short dimension1=0, unsigned short dimension2=0, unsigned short dimension3=0)
 
 ElementURI (const Str &component, const char *elementName, const char *description, ElementType=BASE_ELEMENT, const Unit &unit=UNSPECIFIED_UNIT, BinaryDataType binaryType=NO_TYPE, BlobType blobType=NOT_BLOB, unsigned short dimension1=0, unsigned short dimension2=0, unsigned short dimension3=0)
 
 ElementURI (const Str &component, const Str &elementName, ElementType=BASE_ELEMENT, const Unit &unit=UNSPECIFIED_UNIT, BinaryDataType binaryType=NO_TYPE, BlobType blobType=NOT_BLOB, unsigned short dimension1=0, unsigned short dimension2=0, unsigned short dimension3=0)
 
 ElementURI (const ElementURI &src)
 
virtual ~ElementURI ()
 Destructor. More...
 
 operator const Str & (void) const
 
unsigned short getCode () const
 
void setCode (unsigned short code)
 
virtual bool isUniversal () const
 
const Unit & getUnit () const
 
BinaryDataType getBinaryType () const
 
ElementType getElementType () const
 
unsigned int write (OutStream &outStream)
 
const Str buildURI (const char *component, const char *elementName)
 
const Str buildURI (const Str &component, const char *elementName)
 
const Str buildURI (const Str &component, const Str &elementName)
 
BlobType getBlobType () const
 
int getDimensions () const
 
const unsigned short getDimension1 () const
 
const unsigned short getDimension2 () const
 
const unsigned short getDimension3 () const
 
- Public Member Functions inherited from Str
 Str (const char *str=NULL, size_t length=NO_POS)
 char* constructor Unit tests in Str_Test.testConstructorCharStar More...
 
 Str (const Str &str, const size_t offset=0, size_t count=NO_POS)
 copy constructor Unit tests in Str_Test.testCopyConstructor More...
 
 Str (const bool var)
 bool constructor Unit tests in Str_Test.testBoolConstructor More...
 
 Str (const double var, unsigned int precision=6)
 double constructor Unit tests in Str_Test.testDoubleConstructor More...
 
 Str (const int var, unsigned int radix=10, unsigned int radixOffset=0)
 int constructor Unit tests in Str_Test.testIntConstructor More...
 
 Str (const size_t var, unsigned int radix=16)
 size_t constructor Unit tests in Str_Test.testUnsignedIntConstructor More...
 
virtual ~Str ()
 destructor More...
 
Str & set (const char *str=NULL, size_t length=NO_POS)
 
Str & operator= (const char *str)
 
Str & operator= (const Str &str)
 
Str & operator= (const double var)
 
Str substr (const size_t offset, size_t count=NO_POS) const
 
char operator[] (const size_t index) const
 
Str & operator+= (const bool str)
 
Str & operator+= (const unsigned char str)
 
Str & operator+= (const double str)
 
Str & operator+= (const int str)
 
Str & operator+= (const size_t str)
 
Str & operator+= (const char *str)
 
Str & operator+= (const Str &str)
 
Str & append (const Str &str)
 
Str & append (const char *str, size_t length)
 
Str & pushBack (const unsigned char str)
 
Str & operator<< (const bool str)
 
Str & operator<< (const unsigned char str)
 
Str & operator<< (const double str)
 
Str & operator<< (const int str)
 
Str & operator<< (const size_t str)
 
Str & operator<< (const char *str)
 
Str & operator<< (const Str &str)
 
bool operator!= (const Str &str) const
 
bool operator!= (const char *str) const
 
int compare (const Str &str) const
 
int compare (const char *str) const
 
bool operator== (const Str &str) const
 
bool operator== (const char *str) const
 
bool operator< (const Str &str) const
 
const char * cStr () const
 
const char * data () const
 
size_t length () const
 
size_t size () const
 
size_t findLastOf (const unsigned char str) const
 returns the position of the specified character in the string, looking from the end of the string towards the beginning. More...
 
size_t findLastOf (const char *str) const
 returns the position of the specified character string in the string, looking from the end of the string towards the beginning. More...
 
size_t find (const unsigned char str, size_t offset=0) const
 
size_t find (const char *str, size_t offset=0) const
 
size_t find (const Str &str, size_t offset=0) const
 
bool startsWith (const char *str, size_t length=NO_POS) const
 
bool startsWith (const Str &str) const
 
bool endsWith (const Str &str) const
 
bool setChar (size_t index, const unsigned char theChar)
 
void replaceChar (const char replace, const char replaceWith)
 
Str * split (int &num, const char *splitSpec, size_t length=NO_POS) const
 
Str * split (int &num, const Str str) const
 
Str asHex () const
 Return a new Str, with a hex representation of each character of this string. More...
 

Static Public Member Functions

static ElementURI * FindURI (const Str &str)
 
static ElementURI * FindURI (const char *str)
 
static ElementURI * Read (InStream &inStream)
 
static ElementURI Create (const Str &component, const Str &elementName)
 
- Static Public Member Functions inherited from Str
static size_t FindLastOf (const char *str, const unsigned char theChar, size_t length=NO_POS)
 
static size_t Find (const char *str, const unsigned char theChar, size_t length=NO_POS)
 
static unsigned int IntToAscii (int value, char *str, unsigned int base, unsigned int bufSize, unsigned int baseOffset=0)
 convert an integer to a string, returns the length of the string Unit tests in Str_Test.testIntToAscii More...
 

Static Public Attributes

static const unsigned short NUM_CODES = 0x3FFF
 
static const unsigned short NO_CODE = 0x3FFF
 
static const unsigned short SELF_CODE = 0xFFFF
 
static const Unit UNSPECIFIED_UNIT
 
- Static Public Attributes inherited from Str
static const size_t NO_POS
 static constants More...
 
static const size_t MAX_LEN
 
static const Str EMPTY_STR
 
static char NoChars_ [1] = ""
 

Protected Member Functions

 ElementURI (unsigned short code, const char *component, const char *elementName, ElementType=BASE_ELEMENT, const Unit &unit=UNSPECIFIED_UNIT, BinaryDataType binaryType=NO_TYPE, BlobType blobType=NOT_BLOB, unsigned short dimension1=0, unsigned short dimension2=0, unsigned short dimension3=0)
 
- Protected Member Functions inherited from Str
virtual void intoString (const double var, unsigned int precision=10)
 
virtual void intoString (int var, unsigned int radix, unsigned int radixOffset=0)
 

Protected Attributes

ElementType elementType_
 
const Unit & unit_
 
BinaryDataType binaryType_
 
unsigned short code_
 
BlobType blobType_
 
const unsigned short dimension1_
 
const unsigned short dimension2_
 
const unsigned short dimension3_
 
- Protected Attributes inherited from Str
size_t length_
 
char * chars_
 

Friends

class Slate
 

Detailed Description

Code unit that represents a unique name for a DataElement.

Typically combines the name of the element owner with the name of the "quantity" represented by the DataElement.

Constructor & Destructor Documentation

ElementURI::ElementURI ( const char *  component,
const char *  elementName,
ElementType  elementType = BASE_ELEMENT,
const Unit &  unit = UNSPECIFIED_UNIT,
BinaryDataType  binaryType = NO_TYPE,
BlobType  blobType = NOT_BLOB,
unsigned short  dimension1 = 0,
unsigned short  dimension2 = 0,
unsigned short  dimension3 = 0 
)

Referenced by Create(), and Read().

ElementURI::ElementURI ( const Str &  component,
const char *  elementName,
ElementType  elementType = BASE_ELEMENT,
const Unit &  unit = UNSPECIFIED_UNIT,
BinaryDataType  binaryType = NO_TYPE,
BlobType  blobType = NOT_BLOB,
unsigned short  dimension1 = 0,
unsigned short  dimension2 = 0,
unsigned short  dimension3 = 0 
)
ElementURI::ElementURI ( const Str &  component,
const char *  elementName,
const char *  description,
ElementType  elementType = BASE_ELEMENT,
const Unit &  unit = UNSPECIFIED_UNIT,
BinaryDataType  binaryType = NO_TYPE,
BlobType  blobType = NOT_BLOB,
unsigned short  dimension1 = 0,
unsigned short  dimension2 = 0,
unsigned short  dimension3 = 0 
)
ElementURI::ElementURI ( const Str &  component,
const Str &  elementName,
ElementType  elementType = BASE_ELEMENT,
const Unit &  unit = UNSPECIFIED_UNIT,
BinaryDataType  binaryType = NO_TYPE,
BlobType  blobType = NOT_BLOB,
unsigned short  dimension1 = 0,
unsigned short  dimension2 = 0,
unsigned short  dimension3 = 0 
)
ElementURI::ElementURI ( const ElementURI &  src)
virtual ElementURI::~ElementURI ( )
inlinevirtual

Destructor.

ElementURI::ElementURI ( unsigned short  code,
const char *  component,
const char *  elementName,
ElementType  elementType = BASE_ELEMENT,
const Unit &  unit = UNSPECIFIED_UNIT,
BinaryDataType  binaryType = NO_TYPE,
BlobType  blobType = NOT_BLOB,
unsigned short  dimension1 = 0,
unsigned short  dimension2 = 0,
unsigned short  dimension3 = 0 
)
protected

Member Function Documentation

const Str ElementURI::buildURI ( const char *  component,
const char *  elementName 
)

References Str::Str().

const Str ElementURI::buildURI ( const Str &  component,
const char *  elementName 
)

References Str::length().

const Str ElementURI::buildURI ( const Str &  component,
const Str &  elementName 
)

References Str::length().

ElementURI ElementURI::Create ( const Str &  component,
const Str &  elementName 
)
static
ElementURI * ElementURI::FindURI ( const char *  str)
static
int ElementURI::getDimensions ( ) const
inline
ElementType ElementURI::getElementType ( ) const
inline

References elementType_.

Referenced by Unserialize::Run().

ElementURI::operator const Str & ( void  ) const
inline
void ElementURI::setCode ( unsigned short  code)
inline

Friends And Related Function Documentation

friend class Slate
friend

Member Data Documentation

BinaryDataType ElementURI::binaryType_
protected

Referenced by getBinaryType().

BlobType ElementURI::blobType_
protected

Referenced by getBlobType(), getDimensions(), and write().

unsigned short ElementURI::code_
protected

Referenced by getCode(), setCode(), and write().

const unsigned short ElementURI::dimension1_
protected

Referenced by getDimension1(), getDimensions(), and write().

const unsigned short ElementURI::dimension2_
protected

Referenced by getDimension2(), getDimensions(), and write().

const unsigned short ElementURI::dimension3_
protected

Referenced by getDimension3(), getDimensions(), and write().

ElementType ElementURI::elementType_
protected

Referenced by getElementType(), and write().

const unsigned short ElementURI::NO_CODE = 0x3FFF
static

Referenced by Maintainer::addMaintain(), Reporter::addReport(), Supervisor::addReport(), JsonLogWriter::addVar(), NetCdfTableLogWriter::addVar(), HDF5LogWriter::addVar(), NetCdfLogWriter::addVar(), Reporter::changeReport(), DataNameRule::check(), Slate::CodifyElementURI(), CommandLine::commandConfigSet(), CommandLine::commandFailVariable(), CommandLine::commandMaintainAdd(), CommandLine::commandMaintainInvalid(), CommandLine::commandMaintainRemove(), CommandLine::commandMaintainUnavailable(), CommandLine::commandReportAdd(), CommandLine::commandReportRemove(), CommandLine::commandSet(), CommandLine::commandShowBest(), Slate::DeRegisterElementURI(), Slate::GetElement(), Slate::GetElementURICode(), FilterLogWriter::initializeFilterLogWriter(), ReadDataComponent::initializeReaders(), TableLogWriter::initializeTableLogWriter(), Assign::Instance(), SendDataComponent::Instance(), SyslogComponent::Instance(), NetCdfTableLogWriter::netCdfInitialize(), NetCdfTableLogWriter::NetCdfTableLogWriter(), DataEntry::Read(), EventEntry::Read(), Slate::ReadOnce(), ValueClause::ReadStrValueUri(), Slate::RegisterElementURI(), Maintainer::removeAllMaintains(), Maintainer::removeMaintain(), Reporter::removeReport(), Supervisor::removeReport(), TableLogWriter::resetInputs(), FilterLogWriter::resetInputs(), Unserialize::Run(), LinearApproximationLogWriter::sendOutput(), Slate::Uninitialize(), MultiLogWriter::write(), TableLogWriter::write(), FilterLogWriter::write(), Slate::WriteDirectory(), JsonLogWriter::writeFooter(), NetCdfTableLogWriter::writeFooter(), NetCdfLogWriter::writeFooter(), HDF5LogWriter::writeFooter(), and Slate::WriteOnce().

const unsigned short ElementURI::NUM_CODES = 0x3FFF
static
const unsigned short ElementURI::SELF_CODE = 0xFFFF
static
const Unit& ElementURI::unit_
protected

Referenced by getBinaryType(), and getUnit().

const Unit ElementURI::UNSPECIFIED_UNIT
static

Referenced by Read().


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