OMNeT++ NEDXML  6.0.3
nedutil.h
Go to the documentation of this file.
1 //==========================================================================
2 // nedutil.h - part of
3 //
4 // OMNeT++/OMNEST
5 // Discrete System Simulation in C++
6 //
7 // Contents:
8 // misc util functions
9 //
10 //==========================================================================
11 
12 /*--------------------------------------------------------------*
13  Copyright (C) 2002-2017 Andras Varga
14  Copyright (C) 2006-2017 OpenSim Ltd.
15 
16  This file is distributed WITHOUT ANY WARRANTY. See the file
17  `license' for details on this and other legal matters.
18 *--------------------------------------------------------------*/
19 
20 
21 #ifndef __OMNETPP_NEDXML_NEDUTIL_H
22 #define __OMNETPP_NEDXML_NEDUTIL_H
23 
24 #include <string>
25 #include "astnode.h"
26 
27 namespace omnetpp {
28 namespace nedxml {
29 
30 class PropertyElement;
31 class LiteralElement;
32 
39 {
40  public:
43  static const char *getLocalStringProperty(ASTNode *parent, const char *name);
44  static bool getLocalBoolProperty(ASTNode *parent, const char *name);
45  static PropertyElement *getLocalProperty(ASTNode *parent, const char *name);
46  static LiteralElement *getTheOnlyValueFrom(PropertyElement *property);
47  static bool propertyAsBool(PropertyElement *property);
48  static const char *propertyAsString(PropertyElement *property);
50 
54  static int compare(ASTNode *node1, ASTNode *node2);
56  static int compareTree(ASTNode *node1, ASTNode *node2);
58 };
59 
60 } // namespace nedxml
61 } // namespace omnetpp
62 
63 
64 #endif
65 
omnetpp::nedxml::ASTNodeUtil
Various utilities for the ASTNode tree.
Definition: nedutil.h:38
astnode.h
NEDXML_API
#define NEDXML_API
Definition: nedxmldefs.h:31
omnetpp
Definition: astbuilder.h:25
omnetpp::nedxml::ASTNode
Definition: astnode.h:87