7 #ifndef __FWATOMS_BASE_HPP__ 8 #define __FWATOMS_BASE_HPP__ 13 #include <fwCore/base.hpp> 15 #include "fwAtoms/factory/new.hpp" 16 #include "fwAtoms/registry/detail.hpp" 17 #include "fwAtoms/config.hpp" 29 typedef ::fwAtoms::factory::Key
Key;
46 ::fwAtoms::registry::get()->addFactory(T::classname(), &::fwAtoms::factory::New<T>);
71 virtual Base::sptr clone()
const = 0;
79 return (type() == BOOLEAN) || (type() == NUMERIC) || (type() == STRING);
88 return (type() == BOOLEAN);
97 return (type() == NUMERIC);
106 return (type() == STRING);
115 return (type() == SEQUENCE);
124 return (type() == MAP);
133 return (type() == BLOB);
142 return (type() == OBJECT);
149 FWATOMS_API
virtual std::string getString()
const;
154 virtual AtomType type()
const = 0;
#define fwCoreNonInstanciableClassDefinitionsMacro(_classinfo_)
Generate common code for Non Instanciable classes (Interfaces, Abstract classes, ...)
fwAtoms contains basic objects to represent any other kind of object
Base class for all FW4SPL's classes.
bool isBoolean() const
Test if the current base is a boolean.
bool isValue() const
Test if the current base is a value or not (Value = {string;numeric;boolean})
bool isBlob() const
Test if the current base is a blob (a object with a buffer)
bool isMapping() const
Test if the current base is a mapping.
bool isNumeric() const
Test if the current base is a Numeric (real or integer)
Class used to register a class factory in factory registry. This class defines also the object factor...
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
static FWATOMS_API const std::string s_VERSION
Defines fwAtoms version.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
bool isString() const
Test if the current base is a string.
Base class for all Atom classes.
bool isSequence() const
Test if the current base is a sequence.
bool isObject() const
Test if the current base is an object (representation of fwData)