OpenLexocad  28.0
Core::VariantHandler Class Referenceabstract

#include <Variant.h>

Inheritance diagram for Core::VariantHandler:
Topo::ConstShapeVariantHandler Topo::ShapeVariantHandler

Public Member Functions

virtual Core::Variant create ()=0
 Creates a Variant. More...
 
virtual bool isEqual (const Core::Variant &v1, const Core::Variant &v2, double tolerance=1E-06) const =0
 Compares, if two Variants, both of the same type, are equal. More...
 
virtual int getType ()=0
 Returns the Variant type. More...
 
virtual Base::String getAsString (const Core::Variant &v) const =0
 Returns a string representation of the value of the Variant. More...
 

Static Public Member Functions

static VariantHandlergetVariantHandler (int type)
 Returns the VariantHandler for this type. More...
 
static bool registerVariantHandler (int type, VariantHandler *vhnd)
 Registers a VariantHandler for a given type. returns true, if successful, false if a handler for this type exists already. More...
 

Member Function Documentation

◆ create()

virtual Core::Variant Core::VariantHandler::create ( )
pure virtual

◆ getAsString()

virtual Base::String Core::VariantHandler::getAsString ( const Core::Variant v) const
pure virtual

Returns a string representation of the value of the Variant.

Implemented in Topo::ConstShapeVariantHandler, and Topo::ShapeVariantHandler.

◆ getType()

virtual int Core::VariantHandler::getType ( )
pure virtual

Returns the Variant type.

Implemented in Topo::ConstShapeVariantHandler, and Topo::ShapeVariantHandler.

◆ getVariantHandler()

static VariantHandler* Core::VariantHandler::getVariantHandler ( int  type)
static

Returns the VariantHandler for this type.

◆ isEqual()

virtual bool Core::VariantHandler::isEqual ( const Core::Variant v1,
const Core::Variant v2,
double  tolerance = 1E-06 
) const
pure virtual

Compares, if two Variants, both of the same type, are equal.

Implemented in Topo::ConstShapeVariantHandler, and Topo::ShapeVariantHandler.

◆ registerVariantHandler()

static bool Core::VariantHandler::registerVariantHandler ( int  type,
VariantHandler vhnd 
)
static

Registers a VariantHandler for a given type. returns true, if successful, false if a handler for this type exists already.


The documentation for this class was generated from the following file: