|
| 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
|
| |
| 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 66 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 292 of file PatchDataLayerLayout.hpp.
◆ 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 195 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 383 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 148 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 180 of file PatchDataLayerLayout.hpp.
◆ get_description_str()
| std::string shamrock::patch::PatchDataLayerLayout::get_description_str |
( |
| ) |
const |
◆ get_field() [1/2]
Get the field description id if matching name & type.
- Template Parameters
-
- Parameters
-
- Returns
- FieldDescriptor<T>
Definition at line 321 of file PatchDataLayerLayout.hpp.
◆ get_field() [2/2]
Get the field description at given index.
- Template Parameters
-
- Parameters
-
- Returns
- FieldDescriptor<T>
Definition at line 337 of file PatchDataLayerLayout.hpp.
◆ get_field_idx() [1/2]
template<class T >
| u32 shamrock::patch::PatchDataLayerLayout::get_field_idx |
( |
const std::string & |
field_name | ) |
const |
|
inline |
Get the field id if matching name & type.
- Template Parameters
-
- Parameters
-
- Returns
- u32
Definition at line 349 of file PatchDataLayerLayout.hpp.
◆ get_field_idx() [2/2]
template<class T >
| u32 shamrock::patch::PatchDataLayerLayout::get_field_idx |
( |
const std::string & |
field_name, |
|
|
u32 |
nvar |
|
) |
| const |
|
inline |
Get the field id if matching name & type & nvar.
- Template Parameters
-
- Parameters
-
- Returns
- u32
Definition at line 368 of file PatchDataLayerLayout.hpp.
◆ 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 |
|
inline |
Get the main field description as a variant object.
- Returns
- const var_t& the variant field description
Definition at line 157 of file PatchDataLayerLayout.hpp.
◆ 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 163 of file PatchDataLayerLayout.cpp.
The documentation for this class was generated from the following files: