# nedbasicvalidator.h

Go to the documentation of this file.

    00001 //==========================================================================
    00002 // nedbasicvalidator.h -
    00003 //
    00004 //                     OMNeT++/OMNEST
    00005 //            Discrete System Simulation in C++
    00006 //
    00007 // Contents:
    00008 //   class NEDBasicValidator
    00009 //
    00010 //==========================================================================
    00011
    00012 /*--------------------------------------------------------------*
    00013   Copyright (C) 2002-2005 Andras Varga
    00014
    00015   This file is distributed WITHOUT ANY WARRANTY. See the file
    00016   `license' for details on this and other legal matters.
    00017 *--------------------------------------------------------------*/
    00018
    00019
    00020 #ifndef __NEDBASICVALIDATOR_H
    00021 #define __NEDBASICVALIDATOR_H
    00022
    00023 #include "nedvalidator.h"
    00024
    00025
    00034 class NEDBasicValidator : public NEDValidatorBase
    00035 {
    00036   protected:
    00037     bool parsedExpressions;
    00038
    00039     // internal helper: verify that children of node with given tagcode have
    00040     // all different values of the given attribute (e.g. "name")
    00041     void checkUniqueness(NEDElement *node, int childtype, const char *attr);
    00042
    00043     // internal helper: verify attributes
    00044     void checkExpressionAttributes(NEDElement *node, const char *attrs[], bool optional[], int n);
    00045
    00046   public:
    00052     NEDBasicValidator(bool parsedExpr) {parsedExpressions=parsedExpr;}
    00053
    00057     virtual ~NEDBasicValidator() {}
    00058
    00061     virtual void validateElement(NedFilesNode *node);
    00062     virtual void validateElement(NedFileNode *node);
    00063     virtual void validateElement(ImportNode *node);
    00064     virtual void validateElement(ImportedFileNode *node);
    00065     virtual void validateElement(ChannelNode *node);
    00066     virtual void validateElement(ChannelAttrNode *node);
    00067     virtual void validateElement(NetworkNode *node);
    00068     virtual void validateElement(SimpleModuleNode *node);
    00069     virtual void validateElement(CompoundModuleNode *node);
    00070     virtual void validateElement(ParamsNode *node);
    00071     virtual void validateElement(ParamNode *node);
    00072     virtual void validateElement(GatesNode *node);
    00073     virtual void validateElement(GateNode *node);
    00074     virtual void validateElement(MachinesNode *node);
    00075     virtual void validateElement(MachineNode *node);
    00076     virtual void validateElement(SubmodulesNode *node);
    00077     virtual void validateElement(SubmoduleNode *node);
    00078     virtual void validateElement(SubstparamsNode *node);
    00079     virtual void validateElement(SubstparamNode *node);
    00080     virtual void validateElement(GatesizesNode *node);
    00081     virtual void validateElement(GatesizeNode *node);
    00082     virtual void validateElement(SubstmachinesNode *node);
    00083     virtual void validateElement(SubstmachineNode *node);
    00084     virtual void validateElement(ConnectionsNode *node);
    00085     virtual void validateElement(ConnectionNode *node);
    00086     virtual void validateElement(ConnAttrNode *node);
    00087     virtual void validateElement(ForLoopNode *node);
    00088     virtual void validateElement(LoopVarNode *node);
    00089     virtual void validateElement(DisplayStringNode *node);
    00090     virtual void validateElement(ExpressionNode *node);
    00091     virtual void validateElement(OperatorNode *node);
    00092     virtual void validateElement(FunctionNode *node);
    00093     virtual void validateElement(ParamRefNode *node);
    00094     virtual void validateElement(IdentNode *node);
    00095     virtual void validateElement(ConstNode *node);
    00096     virtual void validateElement(CplusplusNode *node);
    00097     virtual void validateElement(StructDeclNode *node);
    00098     virtual void validateElement(ClassDeclNode *node);
    00099     virtual void validateElement(MessageDeclNode *node);
    00100     virtual void validateElement(EnumDeclNode *node);
    00101     virtual void validateElement(EnumNode *node);
    00102     virtual void validateElement(EnumFieldsNode *node);
    00103     virtual void validateElement(EnumFieldNode *node);
    00104     virtual void validateElement(MessageNode *node);
    00105     virtual void validateElement(ClassNode *node);
    00106     virtual void validateElement(StructNode *node);
    00107     virtual void validateElement(FieldsNode *node);
    00108     virtual void validateElement(FieldNode *node);
    00109     virtual void validateElement(PropertiesNode *node);
    00110     virtual void validateElement(PropertyNode *node);
    00111     virtual void validateElement(UnknownNode *node);
    00113 };
    00114
    00115 #endif
    00116