tdaq-develop-2025-02-12
ots::TableVersion Class Reference

#include <otsdaq/TableCore/TableVersion.h>

Public Member Functions

 TableVersion (unsigned int version=INVALID)
 
 TableVersion (char *const &versionStr)
 
 TableVersion (const std::string &versionStr)
 
unsigned int version (void) const
 
bool isTemporaryVersion (void) const
 
bool isScratchVersion (void) const
 
bool isMockupVersion (void) const
 
bool isInvalid (void) const
 isInvalid
 
std::string toString (void) const
 toString
 
TableVersionoperator= (const unsigned int version)
 Operators. More...
 
bool operator== (unsigned int version) const
 operator==
 
bool operator== (const TableVersion &version) const
 
bool operator!= (unsigned int version) const
 operator!=
 
bool operator!= (const TableVersion &version) const
 
bool operator< (const TableVersion &version) const
 operator<
 
bool operator> (const TableVersion &version) const
 operator>
 
bool operator<= (const TableVersion &version) const
 
bool operator>= (const TableVersion &version) const
 
TableVersionoperator*= (const unsigned int a)
 to support StringMacros on TableVersion types More...
 
TableVersionoperator*= (const TableVersion a)
 to support StringMacros on TableVersion types More...
 
TableVersionoperator+= (const TableVersion a)
 to support StringMacros on TableVersion types More...
 
TableVersionoperator-= (const TableVersion a)
 to support StringMacros on TableVersion types More...
 
TableVersionoperator/= (const TableVersion a)
 to support StringMacros on TableVersion types More...
 

Static Public Member Functions

static TableVersion getNextVersion (const TableVersion &version=TableVersion())
 
static TableVersion getNextTemporaryVersion (const TableVersion &version=TableVersion())
 

Static Public Attributes

static const unsigned int INVALID = -1
 
static const unsigned int DEFAULT = 0
 
static const unsigned int SCRATCH = ~(1 << 31)
 

Protected Types

enum  { NUM_OF_TEMP_VERSIONS = 10000 }
 

Protected Attributes

unsigned int version_
 

Friends

std::ostream & operator<< (std::ostream &out, const TableVersion &version)
 

Detailed Description

TableVersion is the type used for version associated with a configuration table (whereas TableGroupKey is the type used for versions association with global configurations)

Designed so that version type could be changed easily, e.g. to string

Definition at line 13 of file TableVersion.h.

Member Function Documentation

◆ getNextTemporaryVersion()

TableVersion TableVersion::getNextTemporaryVersion ( const TableVersion version = TableVersion())
static

getNextTemporaryVersion returns next Temporary version given the most recent temporary version if given nothing returns -2 as first temporary version if given -2, returns -3, etc. if no available temporary versions left return INVALID

Definition at line 174 of file TableVersion.cc.

◆ getNextVersion()

TableVersion TableVersion::getNextVersion ( const TableVersion version = TableVersion())
static

getNextVersion returns next version given the most recent version if given nothing returns DEFAULT as first version if given 0, returns 1, etc. if no available versions left return INVALID

Definition at line 161 of file TableVersion.cc.

◆ isMockupVersion()

bool TableVersion::isMockupVersion ( void  ) const

isMockupVersion the INVALID index represents the mockup version

Definition at line 153 of file TableVersion.cc.

◆ isScratchVersion()

bool TableVersion::isScratchVersion ( void  ) const

isScratchVersion claim the most positive signed integer as the scratch version

Definition at line 145 of file TableVersion.cc.

◆ isTemporaryVersion()

bool TableVersion::isTemporaryVersion ( void  ) const

isTemporaryVersion claim a block of unsigned ints to designate as temporary versions

Definition at line 137 of file TableVersion.cc.

◆ operator*=() [1/2]

TableVersion & TableVersion::operator*= ( const TableVersion  a)

to support StringMacros on TableVersion types

operator*= Only implemented to support StringMacros on TableVersion types (e.g. getMapFromString in StringMacros.icc)

Definition at line 59 of file TableVersion.cc.

◆ operator*=() [2/2]

TableVersion & TableVersion::operator*= ( const unsigned int  a)

to support StringMacros on TableVersion types

operator*= Only implemented to support StringMacros on TableVersion types (e.g. getMapFromString in StringMacros.icc)

Definition at line 51 of file TableVersion.cc.

◆ operator+=()

TableVersion & TableVersion::operator+= ( const TableVersion  a)

to support StringMacros on TableVersion types

operator+= Only implemented to support StringMacros on TableVersion types (e.g. getMapFromString in StringMacros.icc)

Definition at line 67 of file TableVersion.cc.

◆ operator-=()

TableVersion & TableVersion::operator-= ( const TableVersion  a)

to support StringMacros on TableVersion types

operator+= Only implemented to support StringMacros on TableVersion types (e.g. getMapFromString in StringMacros.icc)

Definition at line 75 of file TableVersion.cc.

◆ operator/=()

TableVersion & TableVersion::operator/= ( const TableVersion  a)

to support StringMacros on TableVersion types

operator/= Only implemented to support StringMacros on TableVersion types (e.g. getMapFromString in StringMacros.icc)

Definition at line 83 of file TableVersion.cc.

◆ operator=()

TableVersion & TableVersion::operator= ( const unsigned int  version)

Operators.

assignment operator with type int

Definition at line 42 of file TableVersion.cc.

◆ version()

unsigned int TableVersion::version ( void  ) const

version get version as integer

Definition at line 29 of file TableVersion.cc.


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