OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
oms::ComRef Class Reference

ComRef - component reference. More...

#include <ComRef.h>

Public Member Functions

 ComRef ()
 
 ComRef (const std::string &path)
 
 ComRef (const char *path)
 
 ~ComRef ()
 
 ComRef (const ComRef &copy)
 
ComRefoperator= (const ComRef &copy)
 
ComRef operator+ (const ComRef &rhs) const
 return ComRef(lhs + rhs) - Obs! lhs will lose its suffix More...
 
bool isValidIdent () const
 
bool isEmpty () const
 
bool isRootOf (ComRef child) const
 
ComRef front () const
 returns the first part of the ComRef (including suffix if its the only part) More...
 
ComRef pop_front ()
 returns the first part of the ComRef and removed it from the current object More...
 
std::string suffix () const
 returns the suffix as string More...
 
std::string pop_suffix ()
 returns the suffix as string and removes it from the current object More...
 
bool pop_suffix (const std::string &suffix)
 
bool hasSuffix () const
 returns true if the cref has a suffix, i.e. contains ":" More...
 
bool hasSuffix (const std::string &suffix) const
 returns true if the cref has a suffix that matches the argument More...
 
const char * c_str () const
 
size_t size () const
 
 operator std::string () const
 

Static Public Member Functions

static bool isValidIdent (const std::string &ident)
 

Private Attributes

char * cref
 

Detailed Description

ComRef - component reference.

A component reference is a qualified name of a component. It uses '.' as component separator. It may also contain a ':' followed by a suffix string which is used to define attributes or filenames.

Constructor & Destructor Documentation

◆ ComRef() [1/4]

oms::ComRef::ComRef ( )

◆ ComRef() [2/4]

oms::ComRef::ComRef ( const std::string &  path)

◆ ComRef() [3/4]

oms::ComRef::ComRef ( const char *  path)

◆ ~ComRef()

oms::ComRef::~ComRef ( )

◆ ComRef() [4/4]

oms::ComRef::ComRef ( const ComRef copy)

Member Function Documentation

◆ c_str()

const char* oms::ComRef::c_str ( ) const
inline

◆ front()

oms::ComRef oms::ComRef::front ( ) const

returns the first part of the ComRef (including suffix if its the only part)

◆ hasSuffix() [1/2]

bool oms::ComRef::hasSuffix ( ) const

returns true if the cref has a suffix, i.e. contains ":"

◆ hasSuffix() [2/2]

bool oms::ComRef::hasSuffix ( const std::string &  suffix) const

returns true if the cref has a suffix that matches the argument

◆ isEmpty()

bool oms::ComRef::isEmpty ( ) const

◆ isRootOf()

bool oms::ComRef::isRootOf ( ComRef  child) const

◆ isValidIdent() [1/2]

bool oms::ComRef::isValidIdent ( ) const

◆ isValidIdent() [2/2]

bool oms::ComRef::isValidIdent ( const std::string &  ident)
static

◆ operator std::string()

oms::ComRef::operator std::string ( ) const
inline

◆ operator+()

oms::ComRef oms::ComRef::operator+ ( const ComRef rhs) const

return ComRef(lhs + rhs) - Obs! lhs will lose its suffix

◆ operator=()

oms::ComRef & oms::ComRef::operator= ( const ComRef copy)

◆ pop_front()

oms::ComRef oms::ComRef::pop_front ( )

returns the first part of the ComRef and removed it from the current object

◆ pop_suffix() [1/2]

std::string oms::ComRef::pop_suffix ( )

returns the suffix as string and removes it from the current object

◆ pop_suffix() [2/2]

bool oms::ComRef::pop_suffix ( const std::string &  suffix)

◆ size()

size_t oms::ComRef::size ( ) const

◆ suffix()

std::string oms::ComRef::suffix ( ) const

returns the suffix as string

Member Data Documentation

◆ cref

char* oms::ComRef::cref
private

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