Main Page
Module List
Reference documentation
Namespaces
Classes
Examples
distro
c++_api
inc
opals
c++_api/inc/opals/ObjectBase.hpp
1
#ifndef OPALS_OBJECT_BASE_HPP_INCLUDED
2
#define OPALS_OBJECT_BASE_HPP_INCLUDED
3
4
#include <opals/config.hpp>
5
6
#pragma once
7
8
namespace
opals
9
{
10
/// \brief base class for objects which are controlled using the SharedPtr class.
11
/// the virutal Delete function is used to delete the object in same heap where it was created
12
class
OPALS_API
ObjectBase
{
13
public
:
14
virtual
~
ObjectBase
() {}
15
16
//delete function
17
virtual
void
Delete();
18
};
19
20
/// deleter function for opals::BaseObject objects that can be used e.g. in std::shared_ptr class
21
void
object_base_deleter
(
ObjectBase
*);
22
}
23
24
#endif //OPALS_OBJECT_BASE_HPP_INCLUDED