Use =default for skeleton copy constructor
[ACE_TAO.git] / ACE / ACEXML / common / Validator.h
blob3d18990db4d13d4f9edb49b8f497a1c65d2fa347
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Validator.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
8 */
9 //=============================================================================
10 #ifndef _ACEXML_VALIDATOR_H_
11 #define _ACEXML_VALIDATOR_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/Attributes.h"
21 #include "ACEXML/common/SAXExceptions.h"
23 /**
24 * @class ACEXML_Validator
26 * @brief An abstract virtual class defining validator interface.
28 * An validator provides validation service for one XML element.
29 * ACEXML_Validators are stateful object. Implementations should
30 * remember the current element encountered and determine if
31 * it's a valid sequence of child elements. A parser fishes
32 * out a validator of certain
34 class ACEXML_Export ACEXML_Validator
36 public:
37 virtual ~ACEXML_Validator () = 0;
39 /**
40 * Validate attributes of an element.
42 * @retval 0 if valid, -1 otherwise.
44 virtual int startElement (ACEXML_Attributes *atts) = 0;
46 /**
47 * Validate the next child element.
49 * @retval 0 if valid, -1 otherwise.
51 virtual int nextElement (const ACEXML_Char *namespaceURI,
52 const ACEXML_Char *localName,
53 const ACEXML_Char *qName) = 0;
57 #include /**/ "ace/post.h"
59 #endif /* _ACEXML_VALIDATOR_H_ */