fw4spl
GenericFieldBase.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWDATA_GENERICFIELDBASE_HPP__
8 #define __FWDATA_GENERICFIELDBASE_HPP__
9 
10 #include "fwData/config.hpp"
11 #include "fwData/Object.hpp"
12 
13 #include <fwCore/base.hpp>
14 
15 #include <string>
16 #include <ostream>
17 
18 namespace fwData
19 {
20 
24 class FWDATA_CLASS_API GenericFieldBase : public Object
25 {
26 public:
27 
29 
30  FWDATA_API virtual bool operator== (const GenericFieldBase &lf ) = 0;
31  FWDATA_API virtual bool operator!= (const GenericFieldBase &lf ) = 0;
32  FWDATA_API virtual bool operator< (const GenericFieldBase &lf ) = 0;
33  FWDATA_API virtual bool operator> (const GenericFieldBase &lf ) = 0;
34  FWDATA_API virtual bool operator<= (const GenericFieldBase &lf ) = 0;
35  FWDATA_API virtual bool operator>= (const GenericFieldBase &lf ) = 0;
36  FWDATA_API friend std::ostream& operator<<( std::ostream &, const GenericFieldBase & );
37 
38  FWDATA_API virtual ::std::string toString() const = 0;
39  FWDATA_API virtual void fromString(const ::std::string &_value) = 0;
40 
41 
42 private:
43  FWDATA_API virtual std::ostream & toOStream( std::ostream &_os ) const = 0;
44 };
45 
46 } // namespace fwData
47 
48 #endif // __FWDATA_GENERICFIELDBASE_HPP__
#define fwCoreNonInstanciableClassDefinitionsMacro(_classinfo_)
Generate common code for Non Instanciable classes (Interfaces, Abstract classes, ...)
GenericFieldBase define common operation on simple data.
Base class for each data object.
Contains the representation of the data objects used in the framework.