dtdvalidationutils.h Source File¶ NEDXML API: dtdvalidationutils.h Source File NEDXML API srcnedxml dtdvalidationutils.h 1//========================================================================== 2// dtdvalidationutils.h - 3// 4// OMNeT++/OMNEST 5// Discrete System Simulation in C++ 6// 7//========================================================================== 8 9/*--------------------------------------------------------------* 10 Copyright (C) 2002-2017 Andras Varga 11 Copyright (C) 2006-2017 OpenSim Ltd. 12 13 This file is distributed WITHOUT ANY WARRANTY. See the file 14 `license' for details on this and other legal matters. 15*--------------------------------------------------------------*/ 16 17 18#ifndef __OMNETPP_NEDXML_DTDVALIDATIONUTILS_H 19#define __OMNETPP_NEDXML_DTDVALIDATIONUTILS_H 20 21#include "nedxmldefs.h" 22 23namespace omnetpp { 24namespace nedxml { 25 26class ASTNode; 27class ErrorStore; 28 34class NEDXML_API DtdValidationUtils 35{ 36 protected: 37 ErrorStore *errors; 38 void tryCheckChoice(ASTNode *node, ASTNode *&curchild, int tags[], char mult); 39 40 public: 41 struct Choice { 42 int tags[20]; // array terminated by NED_NULL (increase size if needed) 43 char mult; 44 }; 45 46 public: 47 DtdValidationUtils(ErrorStore *e) : errors(e) {} 48 void checkSequence(ASTNode *node, int tags[], char mult[]); 49 void checkChoice(ASTNode *node, int tags[], char mult); 50 void checkSeqOfChoices(ASTNode *node, Choice choices[], int n); 51 void checkEmpty(ASTNode *node); 52 void checkRequiredAttribute(ASTNode *node, const char *attr); 53 void checkEnumeratedAttribute(ASTNode *node, const char *attr, const char *vals[], int n); 54 void checkNameAttribute(ASTNode *node, const char *attr); 55 void checkCommentAttribute(ASTNode *node, const char *attr); 56}; 57 58} // namespace nedxml 59} // namespace omnetpp 60 61 62#endif 63 omnetpp::nedxml::ASTNodeDefinition astnode.h:88 omnetpp::nedxml::ErrorStoreDefinition errorstore.h:38 Generated on for NEDXML API by 1.14.0