Row representation.
More...
#include <row.hpp>
|
using | column_ptr = std::shared_ptr< column > |
|
|
| row (const row &r)=default |
|
| row (row &&r) noexcept=default |
|
row & | operator= (const row &r)=default |
|
row & | operator= (row &&r)=default |
|
bool | add_column (const std::string &column) |
|
bool | add_column (const column_ptr &col) |
|
bool | has_column (const std::string &column) const |
| Checks if the row has a column of the given name.
|
|
template<class Operator > |
void | process (Operator &op) |
| Serializes the row with the given serializer.
|
|
template<class T > |
void | set (size_t index, const T &val) |
|
template<class T > |
void | set (const std::string &column, const T &val) |
|
void | set (const std::string &column, const std::shared_ptr< value > &value) |
| Sets the given value to the column with given name.
|
|
template<class T > |
T | at (size_t pos) |
|
template<class T > |
T | at (const std::string &column) |
|
void | clear () |
| Clear the row.
|
|
◆ row() [1/2]
matador::row::row |
( |
const row & |
r | ) |
|
|
default |
Copy constructs a row from a given row
- Parameters
-
◆ row() [2/2]
matador::row::row |
( |
row && |
r | ) |
|
|
defaultnoexcept |
Copy moves a row from a given row
- Parameters
-
◆ add_column() [1/2]
bool matador::row::add_column |
( |
const column_ptr & |
col | ) |
|
Add a column to the row. If column already exists
- Parameters
-
- Returns
- True if column was added, false if column already exists
◆ add_column() [2/2]
bool matador::row::add_column |
( |
const std::string & |
column | ) |
|
Add a column to the row. If column already exists
- Parameters
-
- Returns
- True if column was added, false if column already exists
◆ at() [1/2]
template<class T >
T matador::row::at |
( |
const std::string & |
column | ) |
|
|
inline |
Get value of column identified by name
- Template Parameters
-
- Parameters
-
- Returns
- The value of the requested column.
◆ at() [2/2]
template<class T >
T matador::row::at |
( |
size_t |
pos | ) |
|
|
inline |
Get value of column position
- Template Parameters
-
- Parameters
-
- Returns
- The value of the requested column.
◆ clear()
void matador::row::clear |
( |
| ) |
|
Clear the row.
Clear the row and all its columns
◆ has_column()
bool matador::row::has_column |
( |
const std::string & |
column | ) |
const |
Checks if the row has a column of the given name.
- Parameters
-
column | The name of the column to be checked |
- Returns
- True if the column exists
◆ operator=() [1/2]
row & matador::row::operator= |
( |
const row & |
r | ) |
|
|
default |
Copy assigns a row with a given row
- Parameters
-
- Returns
- Reference to assigned row
◆ operator=() [2/2]
row & matador::row::operator= |
( |
row && |
r | ) |
|
|
default |
Copy moves a row with a given row
- Parameters
-
- Returns
- Reference to moved row
◆ process()
template<class Operator >
void matador::row::process |
( |
Operator & |
op | ) |
|
|
inline |
Serializes the row with the given serializer.
- Template Parameters
-
Serializer | The type of the used serializer object |
- Parameters
-
serializer | The serializer to be used |
◆ set() [1/3]
void matador::row::set |
( |
const std::string & |
column, |
|
|
const std::shared_ptr< value > & |
value |
|
) |
| |
Sets the given value to the column with given name.
- Parameters
-
column | The name of the column to be set |
value | The new value of the column |
◆ set() [2/3]
template<class T >
void matador::row::set |
( |
const std::string & |
column, |
|
|
const T & |
val |
|
) |
| |
|
inline |
Set a value for a column identified by its name
- Exceptions
-
- Template Parameters
-
- Parameters
-
column | Name of column to set value for |
val | Value to set |
◆ set() [3/3]
template<class T >
void matador::row::set |
( |
size_t |
index, |
|
|
const T & |
val |
|
) |
| |
|
inline |
Set a value for a column at given index
- Exceptions
-
- Template Parameters
-
- Parameters
-
index | Index of column to set value for |
val | Value to set |
The documentation for this class was generated from the following file: