Skip to content

Commit 3538429

Browse files
Make AbstractObject non copyable
1 parent 10514af commit 3538429

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ set (FESAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
1212

1313
# version mechanism
1414
set (Fesapi_VERSION_MAJOR 2)
15-
set (Fesapi_VERSION_MINOR 12)
16-
set (Fesapi_VERSION_PATCH 2)
17-
set (Fesapi_VERSION_TWEAK 1)
15+
set (Fesapi_VERSION_MINOR 13)
16+
set (Fesapi_VERSION_PATCH 0)
17+
set (Fesapi_VERSION_TWEAK 0)
1818

1919
set (Fesapi_VERSION ${Fesapi_VERSION_MAJOR}.${Fesapi_VERSION_MINOR}.${Fesapi_VERSION_PATCH}.${Fesapi_VERSION_TWEAK})
2020

src/common/AbstractObject.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ under the License.
2828

2929
namespace COMMON_NS
3030
{
31-
/** @brief An abstract data object. */
31+
/** @brief An abstract data object is the super class of all FESAPI dataobjects which are contained in a DataObjectRepository.
32+
* Its lifetime is controlled by a DataObjectRepository making it non copyable, non movable.
33+
*/
3234
class AbstractObject
3335
{
3436
public:
@@ -740,6 +742,10 @@ namespace COMMON_NS
740742
gsoapProxy2_3(proxy),
741743
repository(nullptr) {}
742744

745+
//This class is non copyable (non movable) since it is designed to be owned by a DataObjectRepository
746+
AbstractObject(const AbstractObject&) = delete;
747+
AbstractObject& operator=(const AbstractObject&) = delete;
748+
743749
friend bool COMMON_NS::DataObjectRepository::addDataObject(std::unique_ptr<COMMON_NS::AbstractObject> proxy);
744750
friend COMMON_NS::AbstractObject* COMMON_NS::DataObjectRepository::addOrReplaceDataObject(std::unique_ptr<COMMON_NS::AbstractObject> proxy, bool replaceOnlyContent);
745751

0 commit comments

Comments
 (0)