An input.
More...
#include <input.hpp>
|
|
virtual | ~input () |
| | Destroys the input.
|
| |
| std::size_t | hash_value () const |
| | Returns the hash value.
|
| |
| std::size_t | length () const |
| | Returns the length.
|
| |
| std::unique_ptr< input > | clone () const |
| | Clone this input.
|
| |
| std::unique_ptr< input > | create_subrange (std::size_t offset, std::size_t length) const |
| | Creates a subrange.
|
| |
| void | append (std::unique_ptr< input > &&p_another) |
| | Appends another input.
|
| |
| template<typename C > |
| bool | is () const |
| | Returns true when this object can be casted to the specified concrete input.
|
| |
| template<typename C > |
| const C & | as () const |
| | Casts this object to the specified concrete input.
|
| |
| template<typename C > |
| C & | as () |
| | Casts this object to the specified concrete input.
|
| |
|
| bool | operator== (const input &one, const input &another) |
| | Returns true if one input is equal to another.
|
| |
◆ append()
| void tetengo::lattice::input::append |
( |
std::unique_ptr< input > && | p_another | ) |
|
Appends another input.
- Parameters
-
| p_another | A unique pointer to another input. |
- Exceptions
-
| std::invalid_argument | When p_another is nullptr or its type does not match. |
◆ as() [1/2]
template<typename C >
| C & tetengo::lattice::input::as |
( |
| ) |
|
|
inlinenodiscard |
Casts this object to the specified concrete input.
- Template Parameters
-
- Returns
- The casted concrete vocabulary.
◆ as() [2/2]
template<typename C >
| const C & tetengo::lattice::input::as |
( |
| ) |
const |
|
inlinenodiscard |
Casts this object to the specified concrete input.
- Template Parameters
-
- Returns
- The casted concrete vocabulary.
◆ clone()
| std::unique_ptr< input > tetengo::lattice::input::clone |
( |
| ) |
const |
|
nodiscard |
Clone this input.
- Returns
- A unique pointer to a clone.
◆ create_subrange()
| std::unique_ptr< input > tetengo::lattice::input::create_subrange |
( |
std::size_t | offset, |
|
|
std::size_t | length ) const |
|
nodiscard |
Creates a subrange.
- Parameters
-
| offset | An offset. |
| length | A length. |
- Returns
- A unique pointer to a subrange.
- Exceptions
-
| std::out_of_range | When offset and/or length are out of the range of the input. |
◆ hash_value()
| std::size_t tetengo::lattice::input::hash_value |
( |
| ) |
const |
|
nodiscard |
Returns the hash value.
- Returns
- The hash value.
◆ is()
template<typename C >
| bool tetengo::lattice::input::is |
( |
| ) |
const |
|
inlinenodiscard |
Returns true when this object can be casted to the specified concrete input.
- Template Parameters
-
- Return values
-
| true | When this object can be casted to the specified concrete input. |
| false | Otherwise. |
◆ length()
| std::size_t tetengo::lattice::input::length |
( |
| ) |
const |
|
nodiscard |
Returns the length.
- Returns
- The length.
◆ operator==
| bool operator== |
( |
const input & | one, |
|
|
const input & | another ) |
|
friend |
Returns true if one input is equal to another.
- Parameters
-
| one | One input. |
| another | Another input. |
- Return values
-
| true | When one input is equal to another. |
| valse | Otherwise. |
The documentation for this class was generated from the following file:
- library/lattice/cpp/include/tetengo/lattice/input.hpp