Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Token.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <alib/string>
9#include <ostream>
10
11namespace sax {
12
17class Token {
18public:
19
20 enum class TokenType {
22 };
23
24private:
25 std::string data;
26 TokenType type;
27
28public:
29 Token ( std::string, TokenType );
30
34 const std::string & getData ( ) const &;
35
39 std::string && getData ( ) &&;
40
45 TokenType getType() const;
46
47 bool operator==(const Token& other) const;
48
49 friend std::ostream& operator<<(std::ostream& os, const Token& token);
50};
51
52} /* namespace sax */
53
Definition: Token.h:17
Token(std::string, TokenType)
Definition: Token.cpp:11
TokenType getType() const
Definition: Token.cpp:22
TokenType
Definition: Token.h:20
const std::string & getData() const &
Definition: Token.cpp:14
Definition: ComposerException.cpp:8
Definition: FordFulkerson.hpp:16