this class provides a way to encapsulate a space into a sharable object
More...
#include </home/runner/work/MFrontGenericInterfaceSupport/MFrontGenericInterfaceSupport/include/MGIS/Function/SharedSpace.hxx>
|
| | SharedSpace (const std::shared_ptr< const SpaceType > &s) |
| | constructor, which checks the preconditions before building the object
|
| template<bool doPreconditionChecks> |
| | SharedSpace (const PreconditionsCheck< doPreconditionChecks > &pcheck, const std::shared_ptr< const SpaceType > &s) |
| | constructor
|
|
| SharedSpace (SharedSpace &&)=default |
| | move constructor
|
|
| SharedSpace (const SharedSpace &)=default |
| | copy constructor
|
| const SpaceType & | operator* () const MGIS_NOEXCEPT |
| const SpaceType * | get () const MGIS_NOEXCEPT |
template<SpaceConcept SpaceType>
struct mgis::function::SharedSpace< SpaceType >
this class provides a way to encapsulate a space into a sharable object
Such an object behaves exactly as the underlying space (it satisfies the same concepts) except for the areEquivalent function, which only states that two shared spaces are equivalent when they point to the same object.
- Template Parameters
-
| SpaceType | type of the space encapsulated in the sharable object |
◆ SharedSpace() [1/2]
template<SpaceConcept SpaceType>
constructor, which checks the preconditions before building the object
- Parameters
-
| [in] | s | pointer to the space to encapsulate |
- Note
- a contract violation is reported if the given pointer is null
◆ SharedSpace() [2/2]
template<SpaceConcept SpaceType>
template<bool doPreconditionChecks>
constructor
- Template Parameters
-
| doPreconditionChecks | if true, the preconditions are checked, otherwise they are skipped |
- Parameters
-
| [in] | pcheck | tag stating if the preconditions are checked (preconditions_check) or skipped (no_precondition_check) |
| [in] | s | pointer to the space to encapsulate |
◆ checkPreconditions()
template<SpaceConcept SpaceType>
checks the preconditions of the constructor, i.e. that the given pointer is not null
- Parameters
-
| [in,out] | eh | error handler used to report the errors |
| [in] | s | pointer to the space to encapsulate |
- Returns
- false if the given pointer is null, true otherwise
- Note
- the "invalid space" error message is registered in the error handler when the given pointer is null
◆ get()
template<SpaceConcept SpaceType>
- Returns
- a constant pointer to the encapsulated space
◆ operator*()
template<SpaceConcept SpaceType>
- Returns
- a constant reference to the encapsulated space
The documentation for this struct was generated from the following file: