NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
StringViewBase Class Reference

This class is a base class for all string view classes. More...

#include <structures.hpp>

Inheritance diagram for StringViewBase:
Collaboration diagram for StringViewBase:

Public Member Functions

 StringViewBase ()
 StringViewBase default constructor. More...
 
virtual const std::string * getData () const
 This member function returns a const pointer to the viewed string. Is only used internally. More...
 
bool operator== (const StringViewBase &view) const
 This member function is an overload for the equality operator using another StringViewBase instance. More...
 
bool operator== (const std::string &sString) const
 This member function is an overload for the equality operator using a const std::string instance. More...
 
bool operator== (const char *sString) const
 This member function is an overload for the equality operator using a const char*. More...
 
bool operator!= (const StringViewBase &view) const
 This member function is an overload for the inequality operator using another StringViewBase instance. More...
 
bool operator!= (const std::string &sString) const
 This member function is an overload for the inequality operator using a const std::string instance. More...
 
bool operator!= (const char *sString) const
 This member function is an overload for the inequality operator using a const char*. More...
 
bool operator< (const StringViewBase &view) const
 This member function is an overload for the less operator using another StringViewBase instance. More...
 
bool operator< (const std::string &sString) const
 This member function is an overload for the less operator using a const std::string instance. More...
 
bool operator<= (const StringViewBase &view) const
 This member function is an overload for the less-equal operator using another StringViewBase instance. More...
 
bool operator<= (const std::string &sString) const
 This member function is an overload for the less-equal operator using a const std::string instance. More...
 
bool operator> (const StringViewBase &view) const
 This member function is an overload for the greater operator using another StringViewBase instance. More...
 
bool operator> (const std::string &sString) const
 This member function is an overload for the greater operator using a const std::string instance. More...
 
bool operator>= (const StringViewBase &view) const
 This member function is an overload for the greater-equal operator using another StringViewBase instance. More...
 
bool operator>= (const std::string &sString) const
 This member function is an overload for the greater-equal operator using a const std::string instance. More...
 
std::string operator+ (const StringViewBase &view) const
 This member function is an overload for the concatenation operator using another StringViewBase instance. More...
 
std::string operator+ (const std::string &sString) const
 This member function is an overload for the concatenation operator using a const std::string instance. More...
 
const char & front () const
 This member function provides a const char reference to the first character in the viewed section. More...
 
const char & back () const
 This member function provides a const char reference to the last character in the viewed section. More...
 
std::string::const_iterator begin () const
 This member function provides an iterator to the beginning of the viewed section of the internal string. More...
 
std::string::const_iterator end () const
 This member function provides an iterator to the end of the viewed section of the internal string. More...
 
void trim_front (size_t len)
 This member function can be used to remove characters from the front of the viewed section. More...
 
void trim_back (size_t len)
 This member function can be used to remove characters from the back of the viewed section. More...
 
void strip ()
 This member function shrinks the viewed section to remove all leading or trailing whitespace characters. This is the corresponding member function to StripSpaces(std::string&). More...
 
size_t length () const
 This member function simply returns the length of the viewed section. More...
 
std::string to_string () const
 This member function returns a copy of the viewed section of the string (via std::string::substr). Note that this is an inefficient operation. More...
 
size_t find (const std::string &findstr, size_t pos=0) const
 Wrapper member function for std::string::find() More...
 
size_t find (char c, size_t pos=0) const
 Wrapper member function for std::string::find() More...
 
size_t rfind (const std::string &findstr, size_t pos=std::string::npos) const
 Wrapper member function for std::string::rfind() More...
 
size_t rfind (char c, size_t pos=std::string::npos) const
 Wrapper member function for std::string::rfind() More...
 
size_t find_first_of (const std::string &findstr, size_t pos=0) const
 Wrapper member function for std::string::find_first_of() More...
 
size_t find_first_of (char c, size_t pos=0) const
 Wrapper member function for std::string::find_first_of() More...
 
size_t find_first_not_of (const std::string &findstr, size_t pos=0) const
 Wrapper member function for std::string::find_first_not_of() More...
 
size_t find_first_not_of (char c, size_t pos=0) const
 Wrapper member function for std::string::find_first_not_of() More...
 
size_t find_last_of (const std::string &findstr, size_t pos=std::string::npos) const
 Wrapper member function for std::string::find_last_of() More...
 
size_t find_last_of (char c, size_t pos=std::string::npos) const
 Wrapper member function for std::string::find_last_of() More...
 
size_t find_last_not_of (const std::string &findstr, size_t pos=std::string::npos) const
 Wrapper member function for std::string::find_last_not_of() More...
 
size_t find_last_not_of (char c, size_t pos=std::string::npos) const
 Wrapper member function for std::string::find_last_not_of() More...
 

Protected Member Functions

size_t validizeLength (size_t pos, size_t len) const
 This private member function evaluates, whether the passed length is part of the viewed section and adapts the length correspondingly. More...
 
virtual void clear ()
 Reset function. More...
 
bool validAbsolutePosition (size_t pos) const
 This member function checks, whether the passed (absolute) position is part of the viewed string section. Is mostly used in string find operations. More...
 

Protected Attributes

size_t m_start
 
size_t m_len
 

Detailed Description

This class is a base class for all string view classes.

It gathers the common const operations like finding and equality operators. It can be instantated directly, but it will do nothing due to a missing pointer to the viewed std::string.

Note
String view classes are neither thread safe nor do they update, when the data source has been altered in other locations. They can only be used in single-thread contexts and should be considered as immutable. The MutableStringView class can handle some modifications but will probably invalidate all other string views using the same data source while modifying the data.

Definition at line 909 of file structures.hpp.

Constructor & Destructor Documentation

◆ StringViewBase()

StringViewBase::StringViewBase ( )
inline

StringViewBase default constructor.

Definition at line 966 of file structures.hpp.

Member Function Documentation

◆ back()

const char & StringViewBase::back ( ) const
inline

This member function provides a const char reference to the last character in the viewed section.

Returns
const char&

Definition at line 1282 of file structures.hpp.

References getData(), m_len, and m_start.

Referenced by mu::ParserBase::checkDelimiter(), NumeRe::StringLogicParser::concatenateStrings(), and extractIndexList().

Here is the call graph for this function:

◆ begin()

std::string::const_iterator StringViewBase::begin ( ) const
inline

This member function provides an iterator to the beginning of the viewed section of the internal string.

Returns
std::string::const_iterator

Definition at line 1298 of file structures.hpp.

References getData(), and m_start.

Referenced by getIndices(), and operator+().

Here is the call graph for this function:

◆ clear()

virtual void StringViewBase::clear ( )
inlineprotectedvirtual

Reset function.

Returns
virtual void

Reimplemented in MutableStringView, and StringView.

Definition at line 940 of file structures.hpp.

References m_len, and m_start.

Referenced by strip(), trim_back(), and trim_front().

◆ end()

std::string::const_iterator StringViewBase::end ( ) const
inline

This member function provides an iterator to the end of the viewed section of the internal string.

Returns
std::string::const_iterator

Definition at line 1314 of file structures.hpp.

References getData(), m_len, and m_start.

Referenced by getIndices(), and operator+().

Here is the call graph for this function:

◆ find() [1/2]

size_t StringViewBase::find ( char  c,
size_t  pos = 0 
) const
inline

Wrapper member function for std::string::find()

Parameters
cchar
possize_t
Returns
size_t

Definition at line 1456 of file structures.hpp.

References getData(), m_start, and validAbsolutePosition().

Here is the call graph for this function:

◆ find() [2/2]

size_t StringViewBase::find ( const std::string &  findstr,
size_t  pos = 0 
) const
inline

◆ find_first_not_of() [1/2]

size_t StringViewBase::find_first_not_of ( char  c,
size_t  pos = 0 
) const
inline

Wrapper member function for std::string::find_first_not_of()

Parameters
cchar
possize_t
Returns
size_t

Definition at line 1590 of file structures.hpp.

References getData(), m_start, and validAbsolutePosition().

Here is the call graph for this function:

◆ find_first_not_of() [2/2]

size_t StringViewBase::find_first_not_of ( const std::string &  findstr,
size_t  pos = 0 
) const
inline

Wrapper member function for std::string::find_first_not_of()

Parameters
findstrconst std::string&
possize_t
Returns
size_t

Definition at line 1568 of file structures.hpp.

References getData(), m_start, and validAbsolutePosition().

Referenced by mu::ParserBase::compileVectors(), findCasualCommand(), strfnc_locate(), strfnc_str_not_match(), and strfnc_textparse().

Here is the call graph for this function:

◆ find_first_of() [1/2]

size_t StringViewBase::find_first_of ( char  c,
size_t  pos = 0 
) const
inline

Wrapper member function for std::string::find_first_of()

Parameters
cchar
possize_t
Returns
size_t

Definition at line 1546 of file structures.hpp.

References getData(), m_start, and validAbsolutePosition().

Here is the call graph for this function:

◆ find_first_of() [2/2]

size_t StringViewBase::find_first_of ( const std::string &  findstr,
size_t  pos = 0 
) const
inline

Wrapper member function for std::string::find_first_of()

Parameters
findstrconst std::string&
possize_t
Returns
size_t

Definition at line 1524 of file structures.hpp.

References getData(), m_start, and validAbsolutePosition().

Referenced by expandIndexVectors(), getIndices(), getMatchingParenthesis(), mu::ParserBase::SetExpr(), strfnc_locate(), and strfnc_strmatch().

Here is the call graph for this function:

◆ find_last_not_of() [1/2]

size_t StringViewBase::find_last_not_of ( char  c,
size_t  pos = std::string::npos 
) const
inline

Wrapper member function for std::string::find_last_not_of()

Parameters
cchar
possize_t
Returns
size_t

Definition at line 1681 of file structures.hpp.

References getData(), m_start, validAbsolutePosition(), and validizeLength().

Here is the call graph for this function:

◆ find_last_not_of() [2/2]

size_t StringViewBase::find_last_not_of ( const std::string &  findstr,
size_t  pos = std::string::npos 
) const
inline

Wrapper member function for std::string::find_last_not_of()

Parameters
findstrconst std::string&
possize_t
Returns
size_t

Definition at line 1658 of file structures.hpp.

References getData(), m_start, validAbsolutePosition(), and validizeLength().

Referenced by strfnc_locate(), and strfnc_str_not_rmatch().

Here is the call graph for this function:

◆ find_last_of() [1/2]

size_t StringViewBase::find_last_of ( char  c,
size_t  pos = std::string::npos 
) const
inline

Wrapper member function for std::string::find_last_of()

Parameters
cchar
possize_t
Returns
size_t

Definition at line 1635 of file structures.hpp.

References getData(), m_start, validAbsolutePosition(), and validizeLength().

Here is the call graph for this function:

◆ find_last_of() [2/2]

size_t StringViewBase::find_last_of ( const std::string &  findstr,
size_t  pos = std::string::npos 
) const
inline

Wrapper member function for std::string::find_last_of()

Parameters
findstrconst std::string&
possize_t
Returns
size_t

Definition at line 1612 of file structures.hpp.

References getData(), m_start, validAbsolutePosition(), and validizeLength().

Referenced by mu::ParserBase::FindMultiArgFunc(), and strfnc_strrmatch().

Here is the call graph for this function:

◆ front()

const char & StringViewBase::front ( ) const
inline

This member function provides a const char reference to the first character in the viewed section.

Returns
const char&

Definition at line 1266 of file structures.hpp.

References getData(), and m_start.

Referenced by mu::ParserBase::checkDelimiter(), NumeRe::StringLogicParser::concatenateStrings(), StringVector::makePureString(), and strfnc_textparse().

Here is the call graph for this function:

◆ getData()

virtual const std::string * StringViewBase::getData ( ) const
inlinevirtual

This member function returns a const pointer to the viewed string. Is only used internally.

Returns
const std::string*

Reimplemented in MutableStringView, and StringView.

Definition at line 976 of file structures.hpp.

Referenced by back(), begin(), end(), find(), find_first_not_of(), find_first_of(), find_last_not_of(), find_last_of(), front(), operator!=(), operator+(), operator<(), operator<=(), operator==(), operator>(), operator>=(), rfind(), strip(), and to_string().

◆ length()

size_t StringViewBase::length ( ) const
inline

This member function simply returns the length of the viewed section.

Returns
size_t

Definition at line 1403 of file structures.hpp.

References m_len.

Referenced by NumeRe::StringFuncHandler::argumentParser(), FlowCtrl::calc(), mu::ParserBase::compileVectorExpansion(), mu::ParserBase::compileVectors(), mu::ParserBase::compileVectorsInMultiArgFunc(), NumeRe::StringLogicParser::concatenateStrings(), convertBaseToDecimal(), mu::ExpressionTarget::create(), NumeRe::StringParser::createStack(), DataAccessParser::DataAccessParser(), expandIndexVectors(), extractIndexList(), findCasualCommand(), findCommandWithReturnValue(), NumeRe::StringFuncHandler::findNextFunction(), findShortestMatchForCommand(), getAllArguments(), StringVector::getBooleanVectorized(), getIndices(), getMatchingParenthesis(), getNextCommandLineToken(), handleIndexVectors(), isInQuotes(), StringVector::makePureString(), strfnc_ascii(), strfnc_findfile(), strfnc_findparam(), strfnc_findtoken(), strfnc_getenvvar(), strfnc_getFileParts(), strfnc_isalnum(), strfnc_isalpha(), strfnc_isblank(), strfnc_iscntrl(), strfnc_isdigit(), strfnc_isgraph(), strfnc_islower(), strfnc_isprint(), strfnc_ispunct(), strfnc_isspace(), strfnc_isupper(), strfnc_isxdigit(), strfnc_justify(), strfnc_locate(), strfnc_regex(), strfnc_replace(), strfnc_str_not_match(), strfnc_str_not_rmatch(), strfnc_strfnd(), strfnc_strfndall(), strfnc_strip(), strfnc_strlen(), strfnc_strmatch(), strfnc_strmatchall(), strfnc_strrfnd(), strfnc_strrmatch(), strfnc_substr(), strfnc_textparse(), strfnc_timeformat(), strfnc_to_string(), and strfnc_to_time().

◆ operator!=() [1/3]

bool StringViewBase::operator!= ( const char *  sString) const
inline

This member function is an overload for the inequality operator using a const char*.

Parameters
sStringconst char*
Returns
bool

Definition at line 1080 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator!=() [2/3]

bool StringViewBase::operator!= ( const std::string &  sString) const
inline

This member function is an overload for the inequality operator using a const std::string instance.

Parameters
sStringconst std::string&
Returns
bool

Definition at line 1063 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator!=() [3/3]

bool StringViewBase::operator!= ( const StringViewBase view) const
inline

This member function is an overload for the inequality operator using another StringViewBase instance.

Parameters
viewconst StringViewBase&
Returns
bool

Definition at line 1046 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator+() [1/2]

std::string StringViewBase::operator+ ( const std::string &  sString) const
inline

This member function is an overload for the concatenation operator using a const std::string instance.

Parameters
viewconst StringViewBase&
Returns
std::string

Definition at line 1250 of file structures.hpp.

References begin(), end(), and getData().

Here is the call graph for this function:

◆ operator+() [2/2]

std::string StringViewBase::operator+ ( const StringViewBase view) const
inline

This member function is an overload for the concatenation operator using another StringViewBase instance.

Parameters
viewconst StringViewBase&
Returns
std::string

Definition at line 1233 of file structures.hpp.

References begin(), end(), and getData().

Here is the call graph for this function:

◆ operator<() [1/2]

bool StringViewBase::operator< ( const std::string &  sString) const
inline

This member function is an overload for the less operator using a const std::string instance.

Parameters
sStringconst std::string&
Returns
bool

Definition at line 1114 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator<() [2/2]

bool StringViewBase::operator< ( const StringViewBase view) const
inline

This member function is an overload for the less operator using another StringViewBase instance.

Parameters
viewconst StringViewBase&
Returns
bool

Definition at line 1097 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator<=() [1/2]

bool StringViewBase::operator<= ( const std::string &  sString) const
inline

This member function is an overload for the less-equal operator using a const std::string instance.

Parameters
sStringconst std::string&
Returns
bool

Definition at line 1148 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator<=() [2/2]

bool StringViewBase::operator<= ( const StringViewBase view) const
inline

This member function is an overload for the less-equal operator using another StringViewBase instance.

Parameters
viewconst StringViewBase&
Returns
bool

Definition at line 1131 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator==() [1/3]

bool StringViewBase::operator== ( const char *  sString) const
inline

This member function is an overload for the equality operator using a const char*.

Parameters
sStringconst char*
Returns
bool

Definition at line 1027 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator==() [2/3]

bool StringViewBase::operator== ( const std::string &  sString) const
inline

This member function is an overload for the equality operator using a const std::string instance.

Parameters
sStringconst std::string&
Returns
bool

Definition at line 1009 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator==() [3/3]

bool StringViewBase::operator== ( const StringViewBase view) const
inline

This member function is an overload for the equality operator using another StringViewBase instance.

Parameters
viewconst StringViewBase&
Returns
bool

Definition at line 990 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator>() [1/2]

bool StringViewBase::operator> ( const std::string &  sString) const
inline

This member function is an overload for the greater operator using a const std::string instance.

Parameters
sStringconst std::string&
Returns
bool

Definition at line 1182 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator>() [2/2]

bool StringViewBase::operator> ( const StringViewBase view) const
inline

This member function is an overload for the greater operator using another StringViewBase instance.

Parameters
viewconst StringViewBase&
Returns
bool

Definition at line 1165 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator>=() [1/2]

bool StringViewBase::operator>= ( const std::string &  sString) const
inline

This member function is an overload for the greater-equal operator using a const std::string instance.

Parameters
sStringconst std::string&
Returns
bool

Definition at line 1216 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ operator>=() [2/2]

bool StringViewBase::operator>= ( const StringViewBase view) const
inline

This member function is an overload for the greater-equal operator using another StringViewBase instance.

Parameters
viewconst StringViewBase&
Returns
bool

Definition at line 1199 of file structures.hpp.

References getData(), m_len, and m_start.

Here is the call graph for this function:

◆ rfind() [1/2]

size_t StringViewBase::rfind ( char  c,
size_t  pos = std::string::npos 
) const
inline

Wrapper member function for std::string::rfind()

Parameters
cchar
possize_t
Returns
size_t

Definition at line 1501 of file structures.hpp.

References getData(), m_start, validAbsolutePosition(), and validizeLength().

Here is the call graph for this function:

◆ rfind() [2/2]

size_t StringViewBase::rfind ( const std::string &  findstr,
size_t  pos = std::string::npos 
) const
inline

Wrapper member function for std::string::rfind()

Parameters
findstrconst std::string&
possize_t
Returns
size_t

Definition at line 1478 of file structures.hpp.

References getData(), m_start, validAbsolutePosition(), and validizeLength().

Referenced by isInQuotes(), strfnc_findfile(), and strfnc_strrfnd().

Here is the call graph for this function:

◆ strip()

void StringViewBase::strip ( )
inline

This member function shrinks the viewed section to remove all leading or trailing whitespace characters. This is the corresponding member function to StripSpaces(std::string&).

Returns
void

Definition at line 1369 of file structures.hpp.

References clear(), getData(), m_len, and m_start.

Referenced by FlowCtrl::calc(), NumeRe::StringLogicParser::concatenateStrings(), NumeRe::StringParser::createStack(), expandIndexVectors(), extractIndexList(), getIndices(), getNextCommandLineToken(), mu::ParserBase::IsAlreadyParsed(), isEqualStripped(), strfnc_getkeyval(), strfnc_justify(), and strfnc_locate().

Here is the call graph for this function:

◆ to_string()

std::string StringViewBase::to_string ( ) const
inline

This member function returns a copy of the viewed section of the string (via std::string::substr). Note that this is an inefficient operation.

Returns
std::string

Definition at line 1417 of file structures.hpp.

References getData(), m_len, and m_start.

Referenced by NumeRe::StringFuncHandler::applySpecialStringFuncs(), NumeRe::StringFuncHandler::argumentParser(), FlowCtrl::calc(), mu::ParserBase::compileVectorExpansion(), NumeRe::StringLogicParser::concatenateStrings(), convertBaseToDecimal(), DataAccessParser::DataAccessParser(), NumeRe::StringFuncHandler::evalFunction(), expandIndexVectors(), findCasualCommand(), findCommand(), findCommandWithReturnValue(), mu::ParserBase::FindMultiArgFunc(), NumeRe::StringFuncHandler::findNextFunction(), findShortestMatchForCommand(), getAccessParserForPlotAndFit(), NumeRe::ClusterManager::getCluster(), getNextArgument(), getNextIndex(), getNextSemiColonSeparatedToken(), handleCasualIndices(), isCompleteTable(), MemoryManager::mapStringViewFind(), operator+(), StringVector::operator+(), MutableStringView::replace(), mu::ParserBase::SetExpr(), strfnc_basetodec(), strfnc_char(), strfnc_findfile(), strfnc_findparam(), strfnc_findtoken(), strfnc_getenvvar(), strfnc_getfileinfo(), strfnc_getfilelist(), strfnc_getFileParts(), strfnc_getfolderlist(), strfnc_getkeyval(), strfnc_getopt(), strfnc_isdir(), strfnc_isfile(), strfnc_justify(), strfnc_locate(), strfnc_max(), strfnc_min(), strfnc_regex(), strfnc_repeat(), strfnc_replace(), strfnc_replaceall(), strfnc_sha256(), strfnc_split(), strfnc_str_not_match(), strfnc_str_not_rmatch(), strfnc_strfnd(), strfnc_strfndall(), strfnc_strip(), strfnc_strmatch(), strfnc_strrfnd(), strfnc_strrmatch(), strfnc_substr(), strfnc_textparse(), strfnc_timeformat(), strfnc_to_lowercase(), strfnc_to_time(), and strfnc_to_uppercase().

Here is the call graph for this function:

◆ trim_back()

void StringViewBase::trim_back ( size_t  len)
inline

This member function can be used to remove characters from the back of the viewed section.

Parameters
lensize_t
Returns
void

Definition at line 1351 of file structures.hpp.

References clear(), and m_len.

Referenced by strfnc_strip().

Here is the call graph for this function:

◆ trim_front()

void StringViewBase::trim_front ( size_t  len)
inline

This member function can be used to remove characters from the front of the viewed section.

Parameters
lensize_t
Returns
void

Definition at line 1331 of file structures.hpp.

References clear(), m_len, and m_start.

Referenced by NumeRe::StringParser::createStack(), getIndices(), getNextCommandLineToken(), and strfnc_strip().

Here is the call graph for this function:

◆ validAbsolutePosition()

bool StringViewBase::validAbsolutePosition ( size_t  pos) const
inlineprotected

This member function checks, whether the passed (absolute) position is part of the viewed string section. Is mostly used in string find operations.

Parameters
possize_t
Returns
bool

Definition at line 956 of file structures.hpp.

References m_len, and m_start.

Referenced by find(), find_first_not_of(), find_first_of(), find_last_not_of(), find_last_of(), and rfind().

◆ validizeLength()

size_t StringViewBase::validizeLength ( size_t  pos,
size_t  len 
) const
inlineprotected

This private member function evaluates, whether the passed length is part of the viewed section and adapts the length correspondingly.

Parameters
possize_t starting position
lensize_t
Returns
size_t the new length

Definition at line 926 of file structures.hpp.

References m_len.

Referenced by find_last_not_of(), find_last_of(), MutableStringView::replace(), rfind(), StringView::StringView(), MutableStringView::subview(), and StringView::subview().

Member Data Documentation

◆ m_len

◆ m_start


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