#include <NoTypeInfo.h>
Public Member Functions | |
NoTypeInfo () | |
const AbstractTypeInfo * | BaseType () const override |
const AbstractTypeInfo * | ValueType () const override |
std::string | name () const override |
Returns the name of this type. More... | |
std::string | getTypeName () const override |
bool | ValidInfo () const override |
bool | FixedSize () const override |
bool | ZeroConstructor () const override |
True iff the default constructor of this type is equivalent to setting the memory to 0. More... | |
bool | SimpleCopy () const override |
True iff copying the data can be done with a memcpy(). More... | |
bool | SimpleLayout () const override |
bool | Integer () const override |
True iff this type uses integer values. More... | |
bool | Scalar () const override |
True iff this type uses scalar values. More... | |
bool | Text () const override |
True iff this type uses text values. More... | |
bool | CopyOnWrite () const override |
True iff this type uses copy-on-write. More... | |
bool | Container () const override |
sofa::Size | size () const override |
sofa::Size | byteSize () const override |
sofa::Size | size (const void *) const override |
bool | setSize (void *, sofa::Size) const override |
Resize data to size elements, if relevant. More... | |
long long | getIntegerValue (const void *, Index) const override |
double | getScalarValue (const void *, Index) const override |
std::string | getTextValue (const void *, Index) const override |
Get the value at index of data as a string. More... | |
void | setIntegerValue (void *, Index, long long) const override |
Set the value at index of data from an integer value. More... | |
void | setScalarValue (void *, Index, double) const override |
Set the value at index of data from a scalar value. More... | |
void | setTextValue (void *, Index, const std::string &) const override |
Set the value at index of data from a string value. More... | |
const void * | getValuePtr (const void *) const override |
void * | getValuePtr (void *) const override |
const std::type_info * | type_info () const override |
Get the type_info for this type. More... | |
![]() | |
virtual | ~AbstractTypeInfo ()=default |
const std::string & | getCompilationTarget () const |
void | setCompilationTarget (const std::string &target) |
Static Public Member Functions | |
static AbstractTypeInfo * | Get () |
Protected Member Functions | |
const TypeInfoId & | getBaseTypeId () const override |
const TypeInfoId & | getValueTypeId () const override |
![]() | |
AbstractTypeInfo () | |
|
inline |
|
inlineoverridevirtual |
If the type is a container, returns the TypeInfo for the type of the values inside this container. For example, if the type is fixed_array<fixed_array<int, 2> 3>
, it returns the TypeInfo for fixed_array<int, 2>
.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
The size in bytes of the ValueType For example, the size of a fixed_array<fixed_array<int, 2>, 3>` is 4 on most systems, as it is the byte size of the smallest dimension in the array (int -> 32bit)
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff this type is a container of some sort.
That is, if it can contain several values. In particular, strings are not considered containers.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff this type uses copy-on-write.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff this type has a fixed size. (It cannot be resized)
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlinestatic |
|
inlineoverrideprotectedvirtual |
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Get the value at index of data as an integer. Relevant only if this type can be casted to long long
.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Get the value at index of data as a scalar. Relevant only if this type can be casted to double
.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Get the value at index of data as a string.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Get a read pointer to the underlying memory Relevant only if this type is SimpleLayout
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Get a write pointer to the underlying memory Relevant only if this type is SimpleLayout
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverrideprotectedvirtual |
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff this type uses integer values.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Returns the name of this type.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff this type uses scalar values.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Set the value at index of data from an integer value.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Set the value at index of data from a scalar value.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Resize data to size elements, if relevant.
But resizing is not always relevant, for example:
Returns true iff the data was resizable
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Set the value at index of data from a string value.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff copying the data can be done with a memcpy().
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff the layout in memory is simply N values of the same base type. It means that you can use the abstract index system to iterate over the elements of the type. (It doesn't mean that the BaseType is of a fixed size)
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
The size of this type, in number of elements. For example, the size of a fixed_array<fixed_array<int, 2>, 3>
is 6, and those six elements are conceptually numbered from 0 to 5. This is relevant only if FixedSize() is true. I FixedSize() is false, the return value will be equivalent to the one of byteSize()
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
The size of data, in number of iterable elements (For containers, that'll be the number of elements in the 1st dimension). For example, with type == `
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff this type uses text values.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Get the type_info for this type.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff the TypeInfo for this type contains valid information. A Type is considered "Valid" if there's at least one specialization of the ValueType
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
Returns the TypeInfo for the type of the values accessible by the get*Value() functions. For example, if the type is fixed_array<fixed_array<int, 2> 3>
, it returns the TypeInfo for int
.
Implements sofa::defaulttype::AbstractTypeInfo.
|
inlineoverridevirtual |
True iff the default constructor of this type is equivalent to setting the memory to 0.
Implements sofa::defaulttype::AbstractTypeInfo.