universalCall from class fcf::SpecifierInfo
Property: universalCall
Type:
Class:
Package: fcfBasis
File: bits/PartSpecifier/SpecifierInfo.hpp
Available from version: 1.0.1
Universal call function wrapper that performs the action of the specifier.
Provides a standardized interface for invoking the operator through the framework's universal calling mechanism.
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() {
const fcf::TypeInfo * ti = fcf::Type <int>().typeInfo ();
unsigned int lessSpecifierTypeId = fcf::Type <fcf::LessSpecifier >().index ();
const fcf::SpecifierInfo & si = ti->specifiers .find(lessSpecifierTypeId)->second;
fcf::UniversalCall universalCall = si.universalCall ;
int left = 1;
int right = 2;
fcf::Variant rightWrapper(right, fcf::Variant::REFERENCE );
fcf::Variant lessValue = universalCall(&left, &rightWrapper, 1);
std::cout << "1 < 2: " << lessValue << std::endl;
return 0;
}
Output:
1 < 2: true
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.