fw4spl
fwAtoms::Base Class Referenceabstract

Base class for all Atom classes. More...

#include <Base.hpp>

+ Inheritance diagram for fwAtoms::Base:
+ Collaboration diagram for fwAtoms::Base:

Classes

class  Registrar
 Class used to register a class factory in factory registry. This class defines also the object factory ( 'create' ) More...
 

Public Types

enum  AtomType {
  BOOLEAN = 1, NUMERIC, STRING, OBJECT,
  SEQUENCE, MAP, BLOB
}
 
typedef ::fwAtoms::factory::Key Key
 

Public Member Functions

virtual bool isA (const std::string &type) const override
 
virtual Base::sptr clone () const =0
 Returns a clone object.
 
bool isValue () const
 Test if the current base is a value or not (Value = {string;numeric;boolean}) More...
 
bool isBoolean () const
 Test if the current base is a boolean. More...
 
bool isNumeric () const
 Test if the current base is a Numeric (real or integer) More...
 
bool isString () const
 Test if the current base is a string. More...
 
bool isSequence () const
 Test if the current base is a sequence. More...
 
bool isMapping () const
 Test if the current base is a mapping. More...
 
bool isBlob () const
 Test if the current base is a blob (a object with a buffer) More...
 
bool isObject () const
 Test if the current base is an object (representation of fwData) More...
 
virtual FWATOMS_API std::string getString () const
 Return the string representation of a value. More...
 
virtual AtomType type () const =0
 returns Atom type
 
- Public Member Functions inherited from fwCore::BaseObject
virtual const std::string & getLeafClassname () const
 return object's classname without its namespace, i.e. BaseObject
 

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Static Public Attributes

static FWATOMS_API const std::string s_VERSION = "1"
 Defines fwAtoms version.
 

Protected Member Functions

 Base ()
 Constructor.
 

Demangling methods

virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 

Detailed Description

Base class for all Atom classes.

Definition at line 26 of file core/fwAtoms/include/fwAtoms/Base.hpp.

Member Function Documentation

std::string fwAtoms::Base::getString ( ) const
virtual

Return the string representation of a value.

Returns
the value's representation, else "<Unknown>"

Reimplemented in fwAtoms::Numeric, fwAtoms::String, and fwAtoms::Boolean.

Definition at line 16 of file core/fwAtoms/src/fwAtoms/Base.cpp.

bool fwAtoms::Base::isBlob ( ) const
inline

Test if the current base is a blob (a object with a buffer)

Returns
the test result

Definition at line 131 of file core/fwAtoms/include/fwAtoms/Base.hpp.

bool fwAtoms::Base::isBoolean ( ) const
inline

Test if the current base is a boolean.

Returns
the test result

Definition at line 86 of file core/fwAtoms/include/fwAtoms/Base.hpp.

bool fwAtoms::Base::isMapping ( ) const
inline

Test if the current base is a mapping.

Returns
the test result

Definition at line 122 of file core/fwAtoms/include/fwAtoms/Base.hpp.

bool fwAtoms::Base::isNumeric ( ) const
inline

Test if the current base is a Numeric (real or integer)

Returns
the test result

Definition at line 95 of file core/fwAtoms/include/fwAtoms/Base.hpp.

bool fwAtoms::Base::isObject ( ) const
inline

Test if the current base is an object (representation of fwData)

Returns
the test result

Definition at line 140 of file core/fwAtoms/include/fwAtoms/Base.hpp.

bool fwAtoms::Base::isSequence ( ) const
inline

Test if the current base is a sequence.

Returns
the test result

Definition at line 113 of file core/fwAtoms/include/fwAtoms/Base.hpp.

bool fwAtoms::Base::isString ( ) const
inline

Test if the current base is a string.

Returns
the test result

Definition at line 104 of file core/fwAtoms/include/fwAtoms/Base.hpp.

bool fwAtoms::Base::isValue ( ) const
inline

Test if the current base is a value or not (Value = {string;numeric;boolean})

Returns
the test result

Definition at line 77 of file core/fwAtoms/include/fwAtoms/Base.hpp.


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