opp_msgtool.h Source File

NEDXML API: opp_msgtool.h Source File
NEDXML API
opp_msgtool.h
1//=========================================================================
2// OPP_MSGTOOL.H - part of
3// OMNeT++/OMNEST
4// Discrete System Simulation in C++
5//
6//=========================================================================
7
8/*--------------------------------------------------------------*
9 Copyright (C) 2006-2019 OpenSim Ltd.
10
11 This file is distributed WITHOUT ANY WARRANTY. See the file
12 `license' for details on this and other legal matters.
13*--------------------------------------------------------------*/
14
15#ifndef __OMNETPP_NEDXML_MSGTOOL_H
16#define __OMNETPP_NEDXML_MSGTOOL_H
17
18#include <string>
19#include "nedxmldefs.h"
20
21namespace omnetpp {
22namespace nedxml {
23
24class ASTNode;
25class FilesElement;
26class MsgFileElement;
27
32{
33 protected:
34 bool opt_verbose = false;
35 protected:
36 // utility methods
37 std::vector<std::string> expandMsgFolder(const char *fname);
38 std::vector<std::string> expandFileArg(const char *arg);
39 bool fileLooksLikeXml(const char *filename);
40 MsgFileElement *parseMsgFile(const char *fname, bool opt_storesrc);
41 ASTNode *parseXmlFile(const char *filename);
42 FilesElement *wrapIntoFilesElement(ASTNode *tree);
43 void moveChildren(ASTNode *source, ASTNode *target);
44 void generateMsgFile(const char *filename, MsgFileElement *tree);
45 void generateMsgFiles(FilesElement *tree);
46 void generateXmlFile(const char *filename, ASTNode *tree, bool srcloc);
47 void generateDependencies(const char *depsfile, const char *msgfile, const char *hfile, const char *ccfile, const std::set<std::string>& dependencies, bool wantPhonytargets);
48 void renameFileToBak(const char *fname);
49
50 // commands
51 void helpCommand(int argc, char **argv);
52 void printHelpPage(const std::string& page);
53 void convertCommand(int argc, char **argv);
54 void prettyprintCommand(int argc, char **argv);
55 void validateCommand(int argc, char **argv);
56 void generateCppCommand(int argc, char **argv);
57 public:
58 int main(int argc, char **argv);
59};
60
61} // namespace nedxml
62} // namespace omnetpp
63
64#endif
Definition astnode.h:88
Definition opp_msgtool.h:32