ADTF  3.18.2
workspace/conan/dev_essential/1.3.3/dw/stable/package/37682420cd166e229516a41c8d6a139a0b13e1e1/include/a_util/result/detail/reference_counted_object_intf.h
Go to the documentation of this file.
1 
17 #ifndef A_UTIL_UTIL_RESULT_DETAIL_REFERENCE_COUNTED_OBJECT_INTERFACE_HEADER_INCLUDED
18 #define A_UTIL_UTIL_RESULT_DETAIL_REFERENCE_COUNTED_OBJECT_INTERFACE_HEADER_INCLUDED
19 
20 namespace a_util {
21 namespace result {
22 namespace detail {
28 template <typename Resource /*e.g. a_util::result::detail::IErrorDescription*/>
30 public:
32  virtual void addReference() const = 0;
34  virtual void removeReference() const = 0;
35 
40  virtual Resource& getObject() = 0;
41 
46  virtual const Resource& getObject() const = 0;
47 
48 protected:
51  {
52  }
53 }; // template <typename Resource> class ReferenceCountedObjectInterface
54 
55 } // namespace detail
56 } // namespace result
57 } // namespace a_util
58 
59 #endif // A_UTIL_UTIL_RESULT_DETAIL_REFERENCE_COUNTED_OBJECT_INTERFACE_HEADER_INCLUDED
virtual const Resource & getObject() const =0
Get a reference to the handled object - provided for const correctness.
virtual Resource & getObject()=0
Get a reference to the handled object.
virtual void removeReference() const =0
Decrease the reference count.
virtual void addReference() const =0
Increase the reference count.
Serves as the root component, with common functionality documented in core functionality.
Definition: base.h:24