Dataquay 0.8
Dataquay::Node::VariantEncoder Struct Referenceabstract

VariantEncoder is an abstract interface for classes that can convert between QVariant and strings for storage in literal Node objects. More...

#include <Node.h>

Public Member Functions

virtual ~VariantEncoder ()
 
virtual QVariant toVariant (const QString &n)=0
 Convert a string to a variant.
 
virtual QString fromVariant (const QVariant &v)=0
 Convert a variant to a string.
 

Detailed Description

VariantEncoder is an abstract interface for classes that can convert between QVariant and strings for storage in literal Node objects.

Definition at line 181 of file Node.h.

Constructor & Destructor Documentation

◆ ~VariantEncoder()

virtual Dataquay::Node::VariantEncoder::~VariantEncoder ( )
inlinevirtual

Definition at line 182 of file Node.h.

Member Function Documentation

◆ toVariant()

virtual QVariant Dataquay::Node::VariantEncoder::toVariant ( const QString & n)
pure virtual

Convert a string to a variant.

The VariantEncoder is expected to be know the node type from which the string has been obtained.

◆ fromVariant()

virtual QString Dataquay::Node::VariantEncoder::fromVariant ( const QVariant & v)
pure virtual

Convert a variant to a string.

The specific VariantEncoder is expected to know the node type which is the target of the conversion.


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