fcf::TypeInfo class
Type:
class fcf::TypeInfo
Package: fcfBasis
File: bits/PartType/TypeInfoDefinition.hpp
Available from version: 1.0.1
Structure containing metadata and runtime information for a registered type.
Detailed description
The structure is initialized by the framework itself. Type information can be obtained using the
Typedef
typedef ConvertersType - The type is a map for storing converter functions.
typedef SpecificatorsType - Map type of the mapping from the specificator type index to the specificator information
Properties
- Unique identifier for the type
- Internal flags for framework operation
Methods
- Retrieves a call specificator as a pointer to a specialized function for the given specificator.
template <typename TSpecificator>
fcf::UniversalCall
specificatorUniversalCall (fcf::Exception * a_error)
- Retrieves a universal call function pointer for the given specificator.
Example:
#include <iostream>
#define FCF_BASIS_IMPLEMENTATION
#include <fcfBasis/basis.hpp>
int main() {
// We get information about the type
const fcf::TypeInfo * ti = fcf::Type < std::string * >().typeInfo ();
std::cout << "Type index: 0x" << std::hex << ti->index << std::dec << std::endl;
std::cout << "Type name: " << ti->name << std::endl;
std::cout << "Type size: " << ti->size << std::endl;
return 0;
}
Output:
Type index: 0x1000001e
Type name: std::string*
Type size: 8
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.