OMNeT++ NEDXML  6.0.3
msgyyutil.h
Go to the documentation of this file.
1 //==========================================================================
2 // msgyyutil.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 #ifndef __OMNETPP_NEDXML_MSGYYUTIL_H
18 #define __OMNETPP_NEDXML_MSGYYUTIL_H
19 
20 #include "yyutil.h"
21 #include "msgelements.h"
22 
23 namespace omnetpp {
24 namespace nedxml {
25 namespace msgyyutil { // for now
26 
27 ASTNode *createMsgElementWithTag(ParseContext *np, int tagcode, ASTNode *parent=nullptr);
28 ASTNode *getOrCreateMsgElementWithTag(ParseContext *np, int tagcode, ASTNode *parent);
29 
30 PropertyElement *addProperty(ParseContext *np, ASTNode *node, const char *name); // directly under the node
31 PropertyElement *storeSourceCode(ParseContext *np, ASTNode *node, YYLoc tokenpos);
32 LiteralElement *createPropertyValue(ParseContext *np, YYLoc textpos);
33 
34 void addComment(ParseContext *np, ASTNode *node, const char *locId, const char *comment, const char *defaultValue);
35 void storeFileComment(ParseContext *np, ASTNode *node);
36 void storeBannerComment(ParseContext *np, ASTNode *node, YYLoc tokenpos);
37 void storeRightComment(ParseContext *np, ASTNode *node, YYLoc tokenpos);
38 void storeTrailingComment(ParseContext *np, ASTNode *node, YYLoc tokenpos);
40 void storeBannerAndRightComments(ParseContext *np, ASTNode *node, YYLoc firstpos, YYLoc lastpos);
42 
43 } // namespace msgyyutil
44 } // namespace nedxml
45 } // namespace omnetpp
46 
47 
48 #endif
49 
omnetpp::nedxml::msgyyutil::addProperty
PropertyElement * addProperty(ParseContext *np, ASTNode *node, const char *name)
omnetpp::nedxml::msgyyutil::storeSourceCode
PropertyElement * storeSourceCode(ParseContext *np, ASTNode *node, YYLoc tokenpos)
omnetpp::nedxml::msgyyutil::storeTrailingComment
void storeTrailingComment(ParseContext *np, ASTNode *node, YYLoc tokenpos)
omnetpp::nedxml::YYLoc
Definition: yydefs.h:37
omnetpp::nedxml::msgyyutil::addComment
void addComment(ParseContext *np, ASTNode *node, const char *locId, const char *comment, const char *defaultValue)
omnetpp::nedxml::msgyyutil::getOrCreateMsgElementWithTag
ASTNode * getOrCreateMsgElementWithTag(ParseContext *np, int tagcode, ASTNode *parent)
omnetpp::nedxml::pos
LineColumn pos
omnetpp::nedxml::msgyyutil::storeFileComment
void storeFileComment(ParseContext *np, ASTNode *node)
omnetpp
Definition: astbuilder.h:25
omnetpp::nedxml::msgyyutil::createMsgElementWithTag
ASTNode * createMsgElementWithTag(ParseContext *np, int tagcode, ASTNode *parent=nullptr)
omnetpp::nedxml::msgyyutil::storeRightComment
void storeRightComment(ParseContext *np, ASTNode *node, YYLoc tokenpos)
omnetpp::nedxml::ASTNode
Definition: astnode.h:87
yyutil.h
omnetpp::nedxml::ParseContext
Definition: yydefs.h:48
omnetpp::nedxml::msgyyutil::storeInnerComments
void storeInnerComments(ParseContext *np, ASTNode *node, YYLoc pos)
omnetpp::nedxml::msgyyutil::createPropertyValue
LiteralElement * createPropertyValue(ParseContext *np, YYLoc textpos)
omnetpp::nedxml::msgyyutil::storeBannerComment
void storeBannerComment(ParseContext *np, ASTNode *node, YYLoc tokenpos)
omnetpp::nedxml::msgyyutil::storeBannerAndRightComments
void storeBannerAndRightComments(ParseContext *np, ASTNode *node, YYLoc pos)