OpendTect-6_4  6.4
namedobj.h
Go to the documentation of this file.
1 #ifndef namedobj_h
2 #define namedobj_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Sep 1994, Aug 2006, Mar 2015
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "basicmod.h"
16 #include "callback.h"
17 #include "bufstring.h"
18 
19 
36 {
37 public:
38 
39  NamedObject(const char* nm=0);
40  NamedObject(const NamedObject* linkedto);
41  NamedObject(const NamedObject&);
42  virtual ~NamedObject();
43  void setLinkedTo(NamedObject*);
44  bool operator ==( const NamedObject& oth ) const
45  { return name() == oth.name(); }
46 
47  virtual const OD::String& name() const
48  { return name_ ? *name_ : linkedto_->name(); }
49  virtual const OD::String& annotName() const
50  { return linkedto_ ? linkedto_->annotName() : name();}
51 
52  virtual void setName(const char*);
53  void setCleanName(const char*);
54 
55  void deleteNotify(const CallBack&);
56 
57 protected:
58 
62 
63 private:
64 
65  void cbRem(NamedObject*);
66 
67 };
68 
69 
70 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
NamedObject * linkedto_
Definition: namedobj.h:60
virtual const OD::String & annotName() const
Definition: namedobj.h:49
BufferString * name_
Definition: namedobj.h:59
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Object with a name.
Definition: namedobj.h:35
TypeSet of CallBacks with a few extras.
Definition: callback.h:128
CallBacks object-oriented (object + method).
Definition: callback.h:57
virtual const OD::String & name() const
Definition: namedobj.h:47
CallBackSet * delnotify_
Definition: namedobj.h:61

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019