NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgTags Class Reference

Public Member Functions

 tgTags (const std::string &space_separated_tags)
 
bool contains (const std::string &space_separated_tags) const
 
bool contains (const tgTags &tags) const
 
bool containsAny (const std::string &space_separated_tags)
 
bool containsAny (const tgTags &tags)
 
void append (const std::string &space_separated_tags)
 
void append (const tgTags &tags)
 
void prepend (const std::string &space_separated_tags)
 
void prepend (const tgTags &tags)
 
void remove (const std::string &space_separated_tags)
 
void remove (const tgTags &tags)
 
const int size () const
 
const bool empty () const
 
std::string joinTags (std::string delim="_")
 
bool isIntegery (const std::string s) const
 
bool isValid (std::string tag)
 
std::deque< std::string > & getTags ()
 
const std::deque< std::string > & getTags () const
 
const std::set< std::string > asSet () const
 
std::string & operator[] (int key)
 
const std::string & operator[] (int key) const
 
bool operator== (const tgTags &rhs)
 
tgTagsoperator+= (const tgTags &rhs)
 

Static Public Member Functions

static std::deque< std::string > splitTags (const std::string &s, char delim= ' ')
 
static std::deque< std::string > splitTags (const std::deque< std::string > &s, char delim= ' ')
 

Detailed Description

Definition at line 44 of file tgTags.h.

Member Function Documentation

const std::set<std::string> tgTags::asSet ( ) const
inline

Return the tags as an unordered set

Definition at line 203 of file tgTags.h.

Here is the caller graph for this function:

bool tgTags::isIntegery ( const std::string  s) const
inline

Determine if the string can be cast to an integer

Definition at line 156 of file tgTags.h.

bool tgTags::operator== ( const tgTags rhs)
inline

Check if we contain the same tags regardless of ordering

Definition at line 225 of file tgTags.h.

Here is the call graph for this function:

std::string& tgTags::operator[] ( int  key)
inline

Return a non-const reference to the tag that is indexed by the int key. It must be in m_tags.

Parameters
[in]keythe key of the tag to retrieve a const reference to the tag that is indexed by key

Definition at line 214 of file tgTags.h.

static std::deque<std::string> tgTags::splitTags ( const std::deque< std::string > &  s,
char  delim = ' ' 
)
inlinestatic

Split tags in a set (some of the strings in the set may contain multiple tags) e.g. {'sometag', 'another andanother'} => {'sometag', 'another', 'andanother'}

Definition at line 130 of file tgTags.h.


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