Class CTokenList#
Defined in File tokenlist.h
Inheritance Relationships#
Base Type#
public std::list< CToken >
Class Documentation#
-
class CTokenList : public std::list<CToken>#
Token list class with extra functions to navigate through the list safely.
Unnamed Group
Unnamed Group
Unnamed Group
Public Functions
-
CTokenList()#
Default constructor.
-
CTokenList(const CTokenList &rlstTokens)#
Copy constructor.
- Parameters:
rlstTokens – [in] Reference to the token list.
-
CTokenList(CTokenList &&rlstTokens) noexcept#
Move constructor.
- Parameters:
rlstTokens – [in] Reference to the token list.
-
CTokenList &operator=(const CTokenList &rlstTokens)#
Assignment operator.
- Parameters:
rlstTokens – [in] Reference to the token list.
- Returns:
Reference to this tokenlist.
-
CTokenList &operator=(CTokenList &&rlstTokens) noexcept#
Move operator.
- Parameters:
rlstTokens – [in] Reference to the token list.
- Returns:
Reference to this tokenlist.
-
const CToken &Current(size_t nIndex = 0) const#
Get the token relative to the current position or if not valid an empty token.
- Parameters:
nIndex – [in] The amount of tokens to skip before returning the token.
- Returns:
Reference to the token.
-
const CToken &LastValid() const#
Get the current or last valid token. If there is no token, get an empty token.
- Returns:
Reference to the current token.
-
CTokenList operator++(int) const#
Increase the current token to the next position in the tokenlist.
- Returns:
Copy of this tokenlist before incrementation.
-
const CTokenList &operator++() const#
Increase the current token to the next position in the tokenlist.
- Returns:
Reference to this tokenlist.
-
bool End() const#
Returns whether the current token has reached the end of the list or whether the list is empty.
- Returns:
Returns ‘true’ when the end of the token list has been reached; otherwise ‘false’.
-
void pop_front()#
Removes the first element of the container. Overload of std::list::pop_front.
-
void pop_back()#
Removes the last element of the container. Overload of std::list::pop_front.
-
CTokenList()#