fw4spl
SrcLib/core/fwTools/include/fwTools/Object.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 __FWTOOLS_OBJECT_HPP__
8 #define __FWTOOLS_OBJECT_HPP__
9 
10 #include "fwTools/config.hpp"
11 #include "fwTools/fwID.hpp"
12 
13 #include <fwCore/base.hpp>
14 
15 namespace fwTools
16 {
17 
18 class UUID;
19 
23 class FWTOOLS_CLASS_API Object : public ::fwCore::BaseObject,
24  public ::boost::noncopyable,
25  protected ::fwTools::fwID
26 {
27 public:
30 
31  friend class ::fwTools::UUID;
32 
33  // expose API for ID management
34  using ::fwTools::fwID::hasID;
35  using ::fwTools::fwID::getID;
36  using ::fwTools::fwID::setID;
37  using ::fwTools::fwID::resetID;
38 
39  FWTOOLS_API Object();
40  virtual ~Object();
41 
42 protected:
43 
45  SPTR(::fwTools::UUID) m_uuid;
46 };
47 
48 //-----------------------------------------------------------------------------
49 
50 inline Object::~Object()
51 {
52 }
53 
54 //-----------------------------------------------------------------------------
55 
56 }
57 
58 #endif /* __FWTOOLS_OBJECT_HPP__ */
#define SPTR(_cls_)
#define fwCoreNonInstanciableClassDefinitionsMacro(_classinfo_)
Generate common code for Non Instanciable classes (Interfaces, Abstract classes, ...)
Base class for all FW4SPL&#39;s classes.
Definition: BaseObject.hpp:22
The namespace fwTools contains several tools like UUID, factory, dispatche, stringizer, macros, helper.
Define Base class for FW4SPL objects and services.
Defines ID for fwTools::Object. It is used to associate ID with object.
Definition: fwID.hpp:26
Management of UUID on objects.
Definition: UUID.hpp:24
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.