The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::Tag Class Reference

Tag(): Simple class to provide nested sequence numbering. More...

#include <Tag.hpp>

Public Member Functions

 Tag ()
 Tag(): Constructor Construct a new tag, using the internal global sequence number.
 
 Tag (const Tag &other)=default
 Tag(): Copy constructor.
 
 Tag (Tag *parent)
 Tag(): Construct as a child of a parent Tag. This will increment the child sequence counter in the parent.
 
 operator std::string () const
 std::string(): String casting operator
 
bool operator== (const Tag &other) const
 ==(): Equality operator
 
bool operator!= (const Tag &other) const
 !=(): Inequality operator
 
bool operator== (const std::string &s) const
 ==(): Equality operator (vs. string)
 
bool operator!= (const std::string &s) const
 !=(): Inequality operator (vs. string)
 

Static Public Member Functions

static void resetGlobalSeqNum ()
 

Detailed Description

Tag(): Simple class to provide nested sequence numbering.

Tags are identifiers for objects in simulation. Tags are nested, meaning that one Tag can be a child of another. In this case, the the tag is labeled like so: <parent>.<child>[.<child>]*

Definition at line 30 of file Tag.hpp.

Constructor & Destructor Documentation

◆ Tag() [1/3]

sparta::Tag::Tag ( )
inline

Tag(): Constructor Construct a new tag, using the internal global sequence number.

Definition at line 38 of file Tag.hpp.

◆ Tag() [2/3]

sparta::Tag::Tag ( const Tag other)
default

Tag(): Copy constructor.

Parameters
otherinstance to copy

◆ Tag() [3/3]

sparta::Tag::Tag ( Tag parent)
inline

Tag(): Construct as a child of a parent Tag. This will increment the child sequence counter in the parent.

Parameters
parentParent tag – can be nullptr meaning that is really doesn't have a parent

Definition at line 56 of file Tag.hpp.

Member Function Documentation

◆ operator std::string()

sparta::Tag::operator std::string ( ) const
inline

std::string(): String casting operator

Returns
std::string Full tag string "parent.child" format

Definition at line 73 of file Tag.hpp.

◆ operator!=() [1/2]

bool sparta::Tag::operator!= ( const std::string &  s) const
inline

!=(): Inequality operator (vs. string)

Parameters
sString to compare
Returns
bool TRUE if different

Definition at line 142 of file Tag.hpp.

Here is the call graph for this function:

◆ operator!=() [2/2]

bool sparta::Tag::operator!= ( const Tag other) const
inline

!=(): Inequality operator

Parameters
otherOther tag to compare
Returns
bool TRUE if different

Definition at line 118 of file Tag.hpp.

Here is the call graph for this function:

◆ operator==() [1/2]

bool sparta::Tag::operator== ( const std::string &  s) const
inline

==(): Equality operator (vs. string)

Parameters
sString to compare
Returns
bool TRUE if same

Definition at line 130 of file Tag.hpp.

◆ operator==() [2/2]

bool sparta::Tag::operator== ( const Tag other) const
inline

==(): Equality operator

Parameters
otherOther tag to compare
Returns
bool TRUE if same

Definition at line 92 of file Tag.hpp.

◆ resetGlobalSeqNum()

static void sparta::Tag::resetGlobalSeqNum ( )
inlinestatic

Definition at line 147 of file Tag.hpp.


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