cartobase  5.0.5
carto::StringInterface Class Referenceabstract

Objects whose value may be represented as a character string. More...

#include <cartobase/object/object.h>

Inheritance diagram for carto::StringInterface:
Collaboration diagram for carto::StringInterface:

Public Member Functions

virtual ~StringInterface ()
 
virtual bool isString () const
 Returns false if the stored object doesn't actually implement the StringInterface API (needed since all GenericObject inherit this interface whatever they actually contain) More...
 
virtual std::string getString () const =0
 Obtain a string value, possibly after a conversion. More...
 
virtual void setString (const std::string &)=0
 The string value may be converted to the actual storage type before it is set in the contained object. More...
 
virtual bool operator== (const StringInterface &other) const
 equality test More...
 
virtual bool operator!= (const StringInterface &other) const
 
- Public Member Functions inherited from carto::Interface
virtual ~Interface ()
 

Detailed Description

Objects whose value may be represented as a character string.

Definition at line 143 of file object.h.

Constructor & Destructor Documentation

◆ ~StringInterface()

virtual carto::StringInterface::~StringInterface ( )
virtual

Member Function Documentation

◆ getString()

virtual std::string carto::StringInterface::getString ( ) const
pure virtual

Obtain a string value, possibly after a conversion.

This method may throw an exception if the stored object has not a string-compatible interface

Implemented in carto::TypedObject< T >, and carto::TypedObject< SyntaxedInterfaceType< T > >.

◆ isString()

virtual bool carto::StringInterface::isString ( ) const
virtual

Returns false if the stored object doesn't actually implement the StringInterface API (needed since all GenericObject inherit this interface whatever they actually contain)

Reimplemented in carto::TypedObject< T >, and carto::TypedObject< SyntaxedInterfaceType< T > >.

◆ operator!=()

virtual bool carto::StringInterface::operator!= ( const StringInterface other) const
inlinevirtual

Definition at line 167 of file object.h.

References operator==().

◆ operator==()

virtual bool carto::StringInterface::operator== ( const StringInterface other) const
virtual

equality test

◆ setString()

virtual void carto::StringInterface::setString ( const std::string &  )
pure virtual

The string value may be converted to the actual storage type before it is set in the contained object.

This method may throw an exception if the stored object has not a string-compatible interface

Implemented in carto::TypedObject< T >, and carto::TypedObject< SyntaxedInterfaceType< T > >.


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