MoReFEM
|
Very generic information about a given unknown. More...
#include <Unknown.hpp>
Public Types | |
using | const_shared_ptr = std::shared_ptr<const Unknown> |
Alias to shared pointer. | |
using | vector_const_shared_ptr = std::vector<const_shared_ptr> |
Alias to vector of shared pointers. | |
using | unique_id_parent = Crtp::UniqueId<Unknown, UnknownNS::unique_id, UniqueIdNS::AssignationMode::manual> |
Alias to the unique id parent. | |
using | underlying_type |
Type used for the unique id. | |
Public Member Functions | |
UnknownNS::Nature | GetNature () const noexcept |
Nature of the unknown. | |
const std::string & | GetName () const noexcept |
Get the name of the variable. | |
UnknownNS::unique_id | GetUniqueId () const |
Get the value of the internal unique ID. | |
Static Public Member Functions | |
static const std::string & | ClassName () |
Name of the class. | |
static UnknownNS::unique_id | GenerateNewEligibleId () |
Generate a unique id. | |
static void | ClearUniqueIdList () |
Clear all unique ids. | |
Static Private Member Functions | |
static UnknownNS::unique_id | AssignUniqueId () |
If AssignationMode is automatic, generates a new unique identifier. | |
static UnknownNS::unique_id | NewUniqueId (UnknownNS::unique_id new_unique_id) |
If AssignationMode is manual, checks the unique identifier provided is valid. | |
static std::set< UnknownNS::unique_id > & | StaticUniqueIdList () |
List of all identifiers existing for DerivedT. | |
Private Attributes | |
const std::string | name_ |
Name of the variable. | |
const UnknownNS::Nature | nature_ |
Nature of the unknown. | |
const UnknownNS::unique_id | unique_id_ |
The value of the unique id for the current DerivedT object. | |
Friends | |
class | UnknownManager |
Friendship. | |
Special members. | |
Unknown (const std::string &name, UnknownNS::unique_id unique_id, const UnknownNS::Nature nature) | |
Constructor. | |
~Unknown ()=default | |
Destructor. | |
Unknown (const Unknown &rhs)=delete | |
The copy constructor. | |
Unknown (Unknown &&rhs)=delete | |
The move constructor. | |
Unknown & | operator= (const Unknown &rhs)=delete |
The (copy) operator=. | |
Unknown & | operator= (Unknown &&rhs)=delete |
The (move) operator=. | |
Very generic information about a given unknown.
|
explicitprivate |
Constructor.
Private as unknown should be created by UnknownManager.
[in] | unique_id | Unique identifier of the unknown, used to tag it in the input data file. |
[in] | name | Name of the unknown, which can be whatever you wish provided it's unique within the model. |
[in] | nature | Whether the unknown is scalar or vectorial. |
|
delete |
The copy constructor.
[in] | rhs | The object from which the construction occurs. |
|
delete |
The move constructor.
[in] | rhs | The object from which the construction occurs. |
The (copy) operator=.
[in] | rhs | The object from which the affectation occurs. |
The (move) operator=.
[in] | rhs | The object from which the affectation occurs. |
|
inherited |
Get the value of the internal unique ID.
|
staticinherited |
Generate a unique id.
No new objects is created, and the new identifier is not counted in the list - the purpose here is just to provide a value that don't collide with existing objects. This is really used in a very edge case; think twice before using this functionality as it really might not be what you really seek.
|
staticinherited |
Clear all unique ids.
|
staticprivateinherited |
If AssignationMode is automatic, generates a new unique identifier.
|
staticprivateinherited |
If AssignationMode is manual, checks the unique identifier provided is valid.
[in] | new_unique_id | The proposed new unique id. If it already exists an exception will be thrown. |