Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / ACEXML / common / Attributes_Def_Builder.h
bloba5e7ccf728540334237f3671c3ad7e39d846d6d9
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Attributes_Def_Builder.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
8 */
9 //=============================================================================
10 #ifndef _ACEXML_ATTRIBUTES_DEF_BUILDER_H_
11 #define _ACEXML_ATTRIBUTES_DEF_BUILDER_H_
13 #include /**/ "ace/pre.h"
14 #include "ACEXML/common/ACEXML_Export.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 #pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ACEXML/common/XML_Types.h"
21 #include "ACEXML/common/SAXExceptions.h"
22 #include <memory>
24 /**
25 * @class ACEXML_Attribute_Def_Builder
27 * @brief An abstract virtual class defining an interface for building an
28 * attribute definition from DTD.
30 * This class should be invisible to application programmers and is only
31 * used for validator implementors.
33 class ACEXML_Export ACEXML_Attribute_Def_Builder
35 public:
36 typedef std::unique_ptr<ACEXML_Attribute_Def_Builder> VAR;
38 enum ATT_TYPE {
39 CDATA,
40 ID,
41 IDREF,
42 IDREFS,
43 ENTITY,
44 ENTITIES,
45 NMTOKEN,
46 NMTOKENS,
47 NOTATION,
48 ENUMERATION,
49 ERROR_TYPE
52 enum DEFAULT_DECL {
53 REQUIRED,
54 IMPLIED,
55 FIXED,
56 INVALID
59 virtual ~ACEXML_Attribute_Def_Builder () = 0;
61 /**
62 * Specify the name of the attribute.
64 virtual int setName (const ACEXML_Char *n) = 0;
66 /**
67 * Get the name of the attribute.
69 virtual const ACEXML_Char *getName () = 0;
71 /**
72 * Set the attribute type.
74 virtual int setAttType (const ATT_TYPE type) = 0;
76 /**
77 * Insert an element for NOTATION or ENUMERATION type attribute.
79 virtual int insertList (const ACEXML_Char *Name) = 0;
81 /**
82 * Set default attribute declaration.
84 virtual int setDefault (const DEFAULT_DECL def,
85 const ACEXML_Char *value) = 0;
87 /**
88 * Check validity of the current attribute definition being built.
90 * @retval 0 if the attribute is not a valid combo.
92 virtual int validAttr () = 0;
94 /**
95 * Dump the content of the attribute definition.
97 virtual void dump () = 0;
101 * @ class ACEXML_Attributes_Def_Builder Attributes_Def_Builder.h "common/Attributes_Def_Builder.h"
103 * @ brief An abstract virtual class defining an interface for building
104 * attribute definitions from DTD.
106 * This class should be invisible to application programmers and
107 * is only used for validator implementors.
109 class ACEXML_Export ACEXML_Attributes_Def_Builder
111 public:
112 typedef std::unique_ptr<ACEXML_Attributes_Def_Builder> VAR;
114 virtual ~ACEXML_Attributes_Def_Builder () = 0;
117 * Set the element name that the attribute builder applies.
119 * @retval 0 if valid, -1 otherwise.
121 virtual int setElement (const ACEXML_Char *namespaceURI,
122 const ACEXML_Char *localName,
123 const ACEXML_Char *qName) = 0;
126 * Acquire an Attribute_Builder.
128 virtual ACEXML_Attribute_Def_Builder *getAttribute_Def_Builder () = 0;
131 * Add a definition for one attribute.
133 virtual int insertAttribute (ACEXML_Attribute_Def_Builder *def) = 0;
137 * Dump the content of the attribute definition.
139 virtual void dump () = 0;
142 #include /**/ "ace/post.h"
144 #endif /* _ACEXML_ATTRIBUTES_DEF_BUILDER_H_ */