Revision 447,
786 bytes
checked in by lmalek, 10 years ago
(diff) |
tree structure reorganization
|
Line | |
---|
1 | #include "SgObject.h" |
---|
2 | |
---|
3 | namespace Sg |
---|
4 | { |
---|
5 | SgObject::SgObject(SgNameType objectName, const SgObject* parentObject): |
---|
6 | parent(parentObject), name(objectName), fullName(name) |
---|
7 | { |
---|
8 | } |
---|
9 | /* |
---|
10 | SgObject::SgObject(const SgObject& org): parent(org.parent), name(org.name) |
---|
11 | { |
---|
12 | } |
---|
13 | */ |
---|
14 | SgObject::~SgObject() |
---|
15 | { |
---|
16 | } |
---|
17 | |
---|
18 | void SgObject::setName(SgNameType newName) |
---|
19 | { |
---|
20 | name = newName; |
---|
21 | modified(); |
---|
22 | } |
---|
23 | |
---|
24 | const SgNameType SgObject::getName() const |
---|
25 | { |
---|
26 | return name; |
---|
27 | } |
---|
28 | |
---|
29 | const SgNameType SgObject::getFullName() const |
---|
30 | { |
---|
31 | return fullName; |
---|
32 | } |
---|
33 | |
---|
34 | void SgObject::refresh() const |
---|
35 | { |
---|
36 | modified(); |
---|
37 | } |
---|
38 | |
---|
39 | void SgObject::modified() const |
---|
40 | { |
---|
41 | if (parent) parent->refresh(); |
---|
42 | } |
---|
43 | |
---|
44 | } // namespace Sg (END) |
---|
45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.