|
| template<class T> |
| void | add_field (const std::string &field_name, u32 nvar, SourceLocation loc=SourceLocation{}) |
| | add a field of type T to the layout
|
| bool | has_field_name (const std::string &field_name) const |
| | Check whether a field with the given name already exists.
|
| template<class T> |
| FieldDescriptor< T > | get_field (const std::string &field_name) |
| | Get the field description id if matching name & type.
|
| template<class T> |
| FieldDescriptor< T > | get_field (u32 idx) |
| | Get the field description at given index.
|
| template<class T> |
| u32 | get_field_idx (const std::string &field_name) const |
| | Get the field id if matching name & type.
|
| template<class T> |
| u32 | get_field_idx (const std::string &field_name, u32 nvar) const |
| | Get the field id if matching name & type & nvar.
|
| template<class T> |
| bool | check_field_type (u32 idx) |
| | check that field of id @idx is of type T
|
| template<class T> |
| bool | check_main_field_type () |
| | check that main field (id=0)is of type T
|
| const var_t & | get_main_field_any () const |
| | Get the main field description as a variant object.
|
| std::string | get_description_str () const |
| | Get the description of the layout.
|
| std::vector< std::string > | get_field_names () |
| | Get the list of field names.
|
| template<class Functor> |
| void | for_each_field_any (Functor &&func) const |
| | for each visit of each field
|
| void | add_field_t (std::string fname, u32 nvar, std::string type) |
| | Add a field with type specified as a string.
|
Definition at line 64 of file PatchDataLayerLayout.hpp.
◆ add_field()
add a field of type T to the layout
- Template Parameters
-
- Parameters
-
| field_name | field name |
| nvar | number of varaible per object |
Definition at line 111 of file PatchDataLayerLayout.cpp.
◆ add_field_t()
| void shamrock::patch::PatchDataLayerLayout::add_field_t |
( |
std::string | fname, |
|
|
u32 | nvar, |
|
|
std::string | type ) |
|
inline |
Add a field with type specified as a string.
- Parameters
-
| fname | the name of the field |
| nvar | the number of variables |
| type | the type of the field as a string |
Definition at line 201 of file PatchDataLayerLayout.hpp.
◆ check_field_type()
template<class T>
| bool shamrock::patch::PatchDataLayerLayout::check_field_type |
( |
u32 | idx | ) |
|
|
inline |
check that field of id @idx is of type T
- Template Parameters
-
- Parameters
-
- Returns
- true
-
false
Definition at line 326 of file PatchDataLayerLayout.hpp.
◆ check_main_field_type()
template<class T>
| bool shamrock::patch::PatchDataLayerLayout::check_main_field_type |
( |
| ) |
|
|
inline |
check that main field (id=0)is of type T
- Template Parameters
-
- Returns
- true
-
false
Definition at line 154 of file PatchDataLayerLayout.hpp.
◆ for_each_field_any()
template<class Functor>
| void shamrock::patch::PatchDataLayerLayout::for_each_field_any |
( |
Functor && | func | ) |
const |
|
inline |
for each visit of each field
- Template Parameters
-
| Functor | the signature of the lambda must be : [?](auto & arg){...} |
- Parameters
-
Definition at line 186 of file PatchDataLayerLayout.hpp.
◆ get_description_str()
| std::string shamrock::patch::PatchDataLayerLayout::get_description_str |
( |
| ) |
const |
◆ get_field() [1/2]
template<class T>
| PatchDataLayerLayout::FieldDescriptor< T > shamrock::patch::PatchDataLayerLayout::get_field |
( |
const std::string & | field_name | ) |
|
|
inline |
◆ get_field() [2/2]
template<class T>
| PatchDataLayerLayout::FieldDescriptor< T > shamrock::patch::PatchDataLayerLayout::get_field |
( |
u32 | idx | ) |
|
|
inline |
◆ get_field_idx() [1/2]
template<class T>
| u32 shamrock::patch::PatchDataLayerLayout::get_field_idx |
( |
const std::string & | field_name | ) |
const |
◆ get_field_idx() [2/2]
template<class T>
| u32 shamrock::patch::PatchDataLayerLayout::get_field_idx |
( |
const std::string & | field_name, |
|
|
u32 | nvar ) const |
◆ get_field_names()
| std::vector< std::string > shamrock::patch::PatchDataLayerLayout::get_field_names |
( |
| ) |
|
◆ get_main_field_any()
| const var_t & shamrock::patch::PatchDataLayerLayout::get_main_field_any |
( |
| ) |
const |
|
inlinenodiscard |
Get the main field description as a variant object.
- Returns
- const var_t& the variant field description
Definition at line 163 of file PatchDataLayerLayout.hpp.
◆ has_field_name()
| bool shamrock::patch::PatchDataLayerLayout::has_field_name |
( |
const std::string & | field_name | ) |
const |
|
nodiscard |
Check whether a field with the given name already exists.
- Parameters
-
| field_name | field name to look up |
- Returns
- true if a field with that name is already in the layout
Definition at line 99 of file PatchDataLayerLayout.cpp.
◆ operator==
Overloaded equality operator for PatchDataLayerLayout class.
This operator is used to check if two PatchDataLayerLayout objects are equal. It compares the fields of the objects and returns true if they are equal, and false otherwise.
- Parameters
-
- Returns
- true if the two objects are equal, false otherwise
Definition at line 231 of file PatchDataLayerLayout.cpp.
The documentation for this class was generated from the following files: