ALBA
albaAttribute.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaAttribute
5 Authors: Marco Petrone
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaAttribute_h
17#define __albaAttribute_h
18//----------------------------------------------------------------------------
19// includes :
20//----------------------------------------------------------------------------
21#include "albaReferenceCounted.h"
22#include "albaStorable.h"
23#include "albaString.h"
24
33class ALBA_EXPORT albaAttribute : public albaReferenceCounted, public albaStorable
34{
35public:
37
39 void operator=(const albaAttribute &a);
40
41 bool operator==(const albaAttribute &a) const;
42
44 virtual void DeepCopy(const albaAttribute *a);
45
48
50 bool Equals(const albaAttribute *a) const;
51
55 void SetName(const char *name);
56 const char *GetName() const;
57
59 albaObject *NewObjectInstance() const {return NULL;}
62
64 virtual void Print(std::ostream& os, const int tabs=0) const;
65protected:
66
67 virtual int InternalStore(albaStorageElement *parent);
69
71};
72
73#endif
74
An abstract class for objects representing an attribute for albaVMEs.
Definition: albaAttribute.h:34
const char * GetName() const
bool Equals(const albaAttribute *a) const
return true if this attribute equals the given one
albaAttribute * NewInstance() const
defined to allow the definition of MakeCopy().
Definition: albaAttribute.h:61
albaAbstractTypeMacro(albaAttribute, albaReferenceCounted)
virtual void DeepCopy(const albaAttribute *a)
copy the content of the given attribute.
albaObject * NewObjectInstance() const
defined to allow the definition of MakeCopy().
Definition: albaAttribute.h:59
void SetName(const char *name)
Set the name of this attribute.
bool operator==(const albaAttribute &a) const
virtual void Print(std::ostream &os, const int tabs=0) const
dump the object to output stream
void operator=(const albaAttribute &a)
attributes must define a copy rule
virtual int InternalStore(albaStorageElement *parent)
This is called by Store() and must be reimplemented by subclasses.
virtual int InternalRestore(albaStorageElement *node)
This is called by Restore() and must be reimplemented by subclasses The element from which the object...
albaString m_Name
Definition: albaAttribute.h:70
albaAttribute * MakeCopy()
create a copy of this attribute
Abstract superclass for all ALBA classes implementing RTTI APIs.
Definition: albaObject.h:38
static albaObject * SafeDownCast(albaObject *o)
Cast with dynamic type checking.
virtual albaObject * NewObjectInstance() const =0
Return a new instance of the same type.
albaReferenceCounted - abstract base class for ALBA objects with reference counting.
albaStorable is an interface for serializable objects.
Definition: albaStorable.h:41
Abstract class representing the interface for the unit of information stored in the storage.
albaString - performs common string operations on c-strings.
Definition: albaString.h:43