The InfoCollection class is a container that holds one or more adaption info items. More...
Public Member Functions | |
InfoCollection () | |
Info & | at (std::size_t id) |
const Info & | at (std::size_t id) const |
std::size_t | create () |
std::size_t | create (Type type, Entity entity, int rank=-1) |
const std::vector< Info > & | data () const noexcept |
std::vector< Info > & | data () noexcept |
std::vector< Info > | dump () |
Info & | operator[] (std::size_t id) |
const Info & | operator[] (std::size_t id) const |
The InfoCollection class is a container that holds one or more adaption info items.
Definition at line 81 of file adaption.hpp.
bitpit::adaption::InfoCollection::InfoCollection | ( | ) |
Default constructor.
Definition at line 78 of file adaption.cpp.
Info & bitpit::adaption::InfoCollection::at | ( | std::size_t | n | ) |
Returns a reference to the adaption info at the specified position in the collection.
n | is the position of an adaption info in the collection. |
Definition at line 162 of file adaption.cpp.
const Info & bitpit::adaption::InfoCollection::at | ( | std::size_t | n | ) | const |
Returns a constant reference to the adaption info at the specified position in the collection.
n | is the position of an adaption info in the collection. |
Definition at line 178 of file adaption.cpp.
std::size_t bitpit::adaption::InfoCollection::create | ( | ) |
Creates an empty adaption info.
Definition at line 115 of file adaption.cpp.
std::size_t bitpit::adaption::InfoCollection::create | ( | Type | type, |
Entity | entity, | ||
int | rank = -1 ) |
Creates an adaption info with the requested data.
If an adaption info with the requested data already exists, the existing value will be returned, otherwise a new adaption info will be created.
type | is the type of adaption info |
entity | is the entity associated to the adaption info |
rank | is the rank associated to the adaption info |
Definition at line 135 of file adaption.cpp.
|
noexcept |
Returns a constant reference to the vector used internally by the collection to store its owned adaption info.
Definition at line 93 of file adaption.cpp.
|
noexcept |
Returns a reference to the vector used internally by the collection to store its owned adaption info.
Definition at line 105 of file adaption.cpp.
std::vector< Info > bitpit::adaption::InfoCollection::dump | ( | ) |
Dumps the collection of adaption info.
Once the collection is dumped, the internal list of adaption info and the internal cache are deleted.
Definition at line 217 of file adaption.cpp.
Info & bitpit::adaption::InfoCollection::operator[] | ( | std::size_t | id | ) |
Get a reference to the specified adaption info
id | is the index of the requested adaption info |
Definition at line 193 of file adaption.cpp.
const Info & bitpit::adaption::InfoCollection::operator[] | ( | std::size_t | id | ) | const |
Get a constant reference to the specified adaption info
id | is the index of the requested adaption info |
Definition at line 204 of file adaption.cpp.