fcf::getTypeInfo() function
Package: fcfBasis
File: bits/PartType/getTypeInfo.hpp
Available from version: 1.0.1
It extracts information about the type given in the function argument in the form of a type index.
If the function is called without the
If the function is called with the
Thrown exceptions
- If the type with the requested index is not registered in the system
Arguments
- Integer type index
- Pointer to an error object that will be filled in the event of a failure. May be zero.
Result
- A pointer to an information object of the corresponding type.
Example:
#include <iostream>
#define FCF_BASIS_IMPLEMENTATION
#include <fcfBasis/basis.hpp>
int main() {
// We get information about the float type
const fcf::TypeInfo * ti = fcf::getTypeInfo (FCF_FLOAT32_TYPE_INDEX );
// The index of the float type
std::cout << "Type index: " << ti->index << std::endl;
// The name of the float type
std::cout << "Type name: " << ti->name << std::endl;
// The data size of the float type
std::cout << "Type size: " << ti->size << std::endl;
return 0;
}
Output:
Type index: 9
Type name: float
Type size: 4
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.