neddtdvalidatorbase.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __NEDDTDVALIDATORBASE_H
00019 #define __NEDDTDVALIDATORBASE_H
00020
00021 #include "nedvalidator.h"
00022
00023 NAMESPACE_BEGIN
00024
00030 class NEDXML_API NEDDTDValidatorBase : public NEDValidatorBase
00031 {
00032 protected:
00033 struct Choice {
00034 int tags[20];
00035 char mult;
00036 };
00037
00038
00039 void tryCheckChoice(NEDElement *node, NEDElement *&curchild, int tags[], char mult);
00040
00043 void checkSequence(NEDElement *node, int tags[], char mult[]);
00044 void checkChoice(NEDElement *node, int tags[], char mult);
00045 void checkSeqOfChoices(NEDElement *node, Choice choices[], int n);
00046 void checkEmpty(NEDElement *node);
00047 void checkRequiredAttribute(NEDElement *node, const char *attr);
00048 void checkEnumeratedAttribute(NEDElement *node, const char *attr, const char *vals[], int n);
00049 void checkNameAttribute(NEDElement *node, const char *attr);
00050 void checkCommentAttribute(NEDElement *node, const char *attr);
00052 public:
00053 NEDDTDValidatorBase(NEDErrorStore *e) : NEDValidatorBase(e) {}
00054 };
00055
00056 NAMESPACE_END
00057
00058
00059 #endif
00060