Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / nsgmls / Attributed.h
1 /* $XConsortium: Attributed.h /main/1 1996/07/29 16:46:44 cde-hp $ */
2 // Copyright (c) 1994 James Clark
3 // See the file COPYING for copying permission.
4
5 #ifndef Attributed_INCLUDED
6 #define Attributed_INCLUDED 1
7
8 #include "Ptr.h"
9 #include "Attribute.h"
10
11 // This is used for things that have attribute definitions
12 // that notations and elements.
13
14 #ifdef SP_NAMESPACE
15 namespace SP_NAMESPACE {
16 #endif
17
18 class SP_API Attributed {
19 public:
20   Attributed() { }
21   ConstPtr<AttributeDefinitionList> attributeDef() const;
22   const AttributeDefinitionList *attributeDefTemp() const;
23   Ptr<AttributeDefinitionList> attributeDef();
24   void setAttributeDef(const Ptr<AttributeDefinitionList> &);
25 private:
26   Ptr<AttributeDefinitionList> attributeDef_;
27
28 };
29
30 inline
31 ConstPtr<AttributeDefinitionList> Attributed::attributeDef() const
32 {
33   return attributeDef_;
34 }
35
36 inline
37 const AttributeDefinitionList *Attributed::attributeDefTemp() const
38 {
39   return attributeDef_.pointer();
40 }
41
42 inline
43 Ptr<AttributeDefinitionList> Attributed::attributeDef()
44 {
45   return attributeDef_;
46 }
47
48 inline
49 void Attributed::setAttributeDef(const Ptr<AttributeDefinitionList> &def)
50 {
51   attributeDef_ = def;
52 }
53
54 #ifdef SP_NAMESPACE
55 }
56 #endif
57
58 #endif /* not Attributed_INCLUDED */