Safir SDK Core
Loading...
Searching...
No Matches
ContainerBase.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright Saab AB, 2006-2013 (http://safirsdkcore.com)
4*
5* Created by: Lars Hagström / stlrha
6*
7*******************************************************************************
8*
9* This file is part of Safir SDK Core.
10*
11* Safir SDK Core is free software: you can redistribute it and/or modify
12* it under the terms of version 3 of the GNU General Public License as
13* published by the Free Software Foundation.
14*
15* Safir SDK Core is distributed in the hope that it will be useful,
16* but WITHOUT ANY WARRANTY; without even the implied warranty of
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18* GNU General Public License for more details.
19*
20* You should have received a copy of the GNU General Public License
21* along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22*
23******************************************************************************/
24
25#ifndef __DOTS_CONTAINER_BASE_H__
26#define __DOTS_CONTAINER_BASE_H__
27
28namespace Safir
29{
30namespace Dob
31{
32namespace Typesystem
33{
34 namespace Internal {class BlobOperations;} //forward declaration of internal stuff
35
44 {
45 public:
51 constexpr ContainerBase(): m_bIsChanged(false) {}
52
54 constexpr ContainerBase(const ContainerBase&) = default;
55
61 virtual ~ContainerBase() {}
62
68 virtual bool IsNull() const = 0;
69
73 virtual void SetNull() = 0;
74
85 virtual bool IsChanged() const {return m_bIsChanged;}
86
101 virtual void SetChanged(const bool changed) {m_bIsChanged = changed;}
102
111 virtual void Copy(const ContainerBase & that) = 0;
112 protected:
122 {m_bIsChanged = other.m_bIsChanged; return *this;}
123
128 };
129
138 static inline bool IsChanged(const ContainerBase & container) {return container.IsChanged();}
139
140}
141}
142}
143#endif
144
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
static bool IsChanged(const ContainerBase &container)
Check if a container is changed.
Definition ContainerBase.h:138
Base class for all Containers.
Definition ContainerBase.h:44
virtual void SetNull()=0
Set the container to null.
constexpr ContainerBase(const ContainerBase &)=default
Copy constructor.
bool m_bIsChanged
The variable containing the change flag.
Definition ContainerBase.h:127
virtual void SetChanged(const bool changed)
Set the containers change flag.
Definition ContainerBase.h:101
virtual void Copy(const ContainerBase &that)=0
Virtual assignment.
constexpr ContainerBase()
Default Constructor.
Definition ContainerBase.h:51
virtual bool IsChanged() const
Is the change flag set on the container?
Definition ContainerBase.h:85
virtual bool IsNull() const =0
Is the container set to null?
virtual ~ContainerBase()
Virtual destructor.
Definition ContainerBase.h:61
ContainerBase & operator=(const ContainerBase &other)
Copy assignment operator.
Definition ContainerBase.h:121