gz/physics/SpecifyData.hh
Go to the documentation of this file.
The CompositeData class allows arbitrary data structures to be composed together, copied,...
Definition: gz/physics/CompositeData.hh:44
QueryMode
Use these flags in Query(), Has(), and StatusOf() to change their effects on the meta info of the dat...
Definition: gz/physics/CompositeData.hh:360
ExpectData is an extension of CompositeData which indicates that the composite expects to be operatin...
Definition: gz/physics/SpecifyData.hh:47
bool Unquery() const
Provides extremely high-speed access for unquerying expected data types and normal access for unexpec...
DataStatus StatusOf() const
Provides extremely high-speed access to the status of expected data types and normal access for unexp...
bool Requires() const
Provides extremely high-speed access for checking whether expected data types are required and normal...
Data & Get()
Provides extremely high-speed access to expected data types and normal access to unexpected data type...
Expected ExpectedData
Definition: gz/physics/SpecifyData.hh:150
void SubSpecification1
Definition: gz/physics/SpecifyData.hh:153
void RequiredData
Definition: gz/physics/SpecifyData.hh:151
void SubSpecification2
Definition: gz/physics/SpecifyData.hh:154
Data * Query(const QueryMode _mode=QueryMode::NORMAL)
Provides extremely high-speed access for querying expected data types and normal access for unexpecte...
InsertResult< Data > Insert(Args &&... _args)
Provides extremely high-speed access to getting or creating expected data types and normal access to ...
static constexpr bool Expects()
Returns true if the Data type is expected. Data types for which this is true will be able to enjoy ex...
bool Remove()
Provides extremely high-speed access for removing expected data types and normal access for unexpecte...
const Data * Query(const QueryMode _mode=QueryMode::NORMAL) const
Const-qualified version of Query<Data>
InsertResult< Data > InsertOrAssign(Args &&... _args)
Provides extremely high-speed access to creating expected data types and normal access to unexpected ...
virtual ~ExpectData()=default
Virtual destructor.
detail::PrivateExpectData< Expected > privateExpectData
Provides the implementation for delegating the functions provided by the ExpectData class.
Definition: gz/physics/SpecifyData.hh:145
ExpectData & operator=(const ExpectData &_other)=default
Copy assignment operator.
ExpectData(const ExpectData &_other)
Copy constructor. The copy constructor of the base class, CompositeData, is called before this copy c...
bool Has() const
Provides extremely high-speed access for checking the existence of expected data types and normal acc...
Data & MakeRequired(Args &&... _args)
Provides extremely high-speed access for making expected data types required and normal access for un...
RequireData is an extension of ExpectData which indicates that the composite requires the existence o...
Definition: gz/physics/SpecifyData.hh:177
detail::PrivateRequireData< Required > privateRequireData
Provides the implementation for delegating the functions provided by the RequireData class.
Definition: gz/physics/SpecifyData.hh:209
const Data & Get() const
Provides extremely high-speed const-qualified reference access to data types that are required.
virtual ~RequireData()=default
Virtual destructor.
static constexpr bool AlwaysRequires()
Returns true if the Data type is always required by this more highly specified CompositeData type.
RequireData()
Default constructor. Will initialize the Required data type using its default constructor.
Required RequiredData
Definition: gz/physics/SpecifyData.hh:181
The SpecifyData class allows you to form combinations of data specifications. In other words,...
Definition: gz/physics/SpecifyData.hh:265
constexpr std::size_t CountUpperLimitOfRequiredData()
Same as CountUpperLimitOfExpectedData() except it will count required data instead.
constexpr std::size_t CountUpperLimitOfSpecifiedData()
Same as CountUpperLimitOfExpectedData() except you can specify what kind of data to count using SpecF...
constexpr std::size_t CountUpperLimitOfExpectedData()
This provides an upper limit on the number of expected data types in a CompositeData specification....
Struct that describes the status of data.
Definition: gz/physics/CompositeData.hh:555
This struct is the return type of the various Insert...<T>() functions. It returns a reference to the...
Definition: gz/physics/CompositeData.hh:107
This allows us to specify that we are interested in expected data while performing template metaprogr...
Definition: gz/physics/SpecifyData.hh:300
typename Specification::ExpectedData Data
Definition: gz/physics/SpecifyData.hh:301
This allows us to specify that we are interested in required data while performing template metaprogr...
Definition: gz/physics/SpecifyData.hh:320
typename Specification::RequiredData Data
Definition: gz/physics/SpecifyData.hh:321
Provides a constexpr field named value whose value is true if and only if Data is expected by Specifi...
Definition: gz/physics/SpecifyData.hh:338
Provides a constexpr field named value whose value is true if and only if Data is required by Specifi...
Definition: gz/physics/SpecifyData.hh:350