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.
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 SpecifiersType - Map type of the mapping from the specifier type index to the specifier information
Properties
- Internal flags for framework operation
Methods
- Retrieves a specifier call as a pointer to a specialized function for the given specifier.
template <typename TSpecifier>
fcf::UniversalCall
specifierUniversalCall (fcf::Exception * a_dstError)
- Retrieves a universal call function pointer for the given specifier.
Example:
#include <iostream>
// Define an implementation macro to include the implementation section in header files.
#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.