Public Member Functions | Static Public Member Functions | List of all members
VarName Class Reference

Specification of a valid Ensight variable-name. More...

Inheritance diagram for VarName:
Inheritance graph
[legend]
Collaboration diagram for VarName:
Collaboration graph
[legend]

Public Member Functions

 VarName (const VarName &)=default
 
 VarName (VarName &&)=default
 
 VarName (const char *s)
 
 VarName (const std::string &s)
 
void stripInvalid ()
 
void operator= (const word &)=delete
 
void operator= (const string &)=delete
 
void operator= (const std::string &)=delete
 
void operator= (const char *)=delete
 
- Public Member Functions inherited from word
 word ()=default
 
 word (const word &)=default
 
 word (word &&w)=default
 
 word (const string &s, bool doStrip=true)
 
 word (string &&s, bool doStrip=true)
 
 word (const std::string &s, bool doStrip=true)
 
 word (std::string &&s, bool doStrip=true)
 
 word (const char *s, bool doStrip=true)
 
 word (const char *s, size_type len, bool doStrip)
 
 word (Istream &is)
 
void stripInvalid ()
 
word lessExt () const
 
word ext () const
 
wordext (const word &ending)
 
wordoperator= (const word &s)
 
wordoperator= (word &&s)
 
wordoperator= (const string &s)
 
wordoperator= (string &&s)
 
wordoperator= (const std::string &s)
 
wordoperator= (std::string &&s)
 
wordoperator= (const char *s)
 
template<class PrimitiveType >
Foam::word printf (const char *fmt, const PrimitiveType &val)
 
template<class PrimitiveType >
Foam::word printf (const std::string &fmt, const PrimitiveType &val)
 
bool hasExt () const
 
bool hasExt (const char *ending) const
 
bool hasExt (const std::string &ending) const
 
bool hasExt (const wordRe &ending) const
 
bool removeExt ()
 
- Public Member Functions inherited from string
 string ()=default
 
 string (const std::string &str)
 
 string (std::string &&str)
 
 string (const char *str)
 
 string (const char *str, const size_type len)
 
 string (const char c)
 
 string (const size_type len, const char c)
 
 string (Istream &is)
 
bool match (const std::string &text) const
 
stringreplace (const std::string &s1, const std::string &s2, size_type pos=0)
 
stringreplaceAll (const std::string &s1, const std::string &s2, size_type pos=0)
 
stringreplaceAny (const std::string &s1, const char c2, size_type pos=0)
 
stringexpand (const bool allowEmpty=false)
 
bool removeRepeated (const char character)
 
bool removeStart (const std::string &text)
 
bool removeStart (const char c)
 
bool removeEnd (const std::string &text)
 
bool removeEnd (const char c)
 
void swap (std::string &str)
 
bool operator() (const std::string &text) const
 
bool starts_with (const std::string &s) const
 
bool starts_with (const char c) const
 
bool ends_with (const std::string &s) const
 
bool ends_with (const char c) const
 
size_type count (const char c) const
 
bool startsWith (const std::string &s) const
 
bool endsWith (const std::string &s) const
 
bool removeTrailing (const char c)
 

Static Public Member Functions

static bool valid (char c)
 
- Static Public Member Functions inherited from word
template<class PrimitiveType >
static word printf (const char *fmt, const PrimitiveType &val)
 
template<class PrimitiveType >
static word printf (const std::string &fmt, const PrimitiveType &val)
 
static bool valid (char c)
 
static word validate (const std::string &s, const bool prefix=false)
 
static word validate (const char *first, const char *last, const bool prefix=false)
 
- Static Public Member Functions inherited from string
template<class StringType >
static bool valid (const std::string &str)
 
template<class StringType >
static bool stripInvalid (std::string &str)
 
template<class StringType >
static StringType validate (const std::string &str)
 

Additional Inherited Members

- Static Public Attributes inherited from word
static const char *const typeName = "word"
 
static int debug
 
static const word null
 
- Static Public Attributes inherited from string
static const char *const typeName = "string"
 
static int debug
 
static const string null
 
- Protected Member Functions inherited from string
std::string::size_type find_ext () const
 
word ext () const
 
bool ext (const word &ending)
 
bool hasPath () const
 
bool hasExt () const
 
bool hasExt (const char *ending) const
 
bool hasExt (const std::string &ending) const
 
bool hasExt (const wordRe &ending) const
 
bool removeExt ()
 
bool removePath ()
 
- Static Protected Member Functions inherited from string
static std::string::size_type find_ext (const std::string &str)
 
template<class PrimitiveType >
static std::string::size_type string_printf (std::string &output, const char *fmt, const PrimitiveType &val)
 
template<class PrimitiveType >
static std::string::size_type string_printf (std::string &output, const std::string &fmt, const PrimitiveType &val)
 

Detailed Description

Specification of a valid Ensight variable-name.

Illegal characters

space !#%()*+,-./;@[]^

If spaces exist, they must be quoted

Variable names cannot start with a digit. The maximum part name length (in GUI: 49 chars) - not addressed. The maximum variable length (in GUI: 49 chars) - not addressed.

Definition at line 53 of file ensightVarName.H.

Constructor & Destructor Documentation

◆ VarName() [1/4]

VarName ( const VarName )
default

◆ VarName() [2/4]

VarName ( VarName &&  )
default

◆ VarName() [3/4]

VarName ( const char *  s)
inlineexplicit

Definition at line 26 of file ensightVarNameI.H.

References VarName::stripInvalid().

Here is the call graph for this function:

◆ VarName() [4/4]

VarName ( const std::string &  s)
inlineexplicit

Definition at line 34 of file ensightVarNameI.H.

References VarName::stripInvalid().

Here is the call graph for this function:

Member Function Documentation

◆ valid()

bool valid ( char  c)
inlinestatic

Definition at line 44 of file ensightVarNameI.H.

References Foam::constant::universal::c, and word::valid().

Here is the call graph for this function:

◆ stripInvalid()

void stripInvalid ( )
inline

Definition at line 67 of file ensightVarNameI.H.

References stdFoam::begin(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, insert(), and Foam::nl.

Referenced by VarName::VarName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/4]

void operator= ( const word )
delete

◆ operator=() [2/4]

void operator= ( const string )
delete

◆ operator=() [3/4]

void operator= ( const std::string &  )
delete

◆ operator=() [4/4]

void operator= ( const char *  )
delete

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