Statistics
| Branch: | Revision:

root / src / org.omnetpp.ide.nativelibs / nedxml.i @ 79bb12dc

History | View | Annotate | Download (4.07 KB)

1
%module nedxml
2

    
3
// covariant return type warning disabled
4
#pragma SWIG nowarn=822
5

    
6
%include "loadlib.i"
7
%include "std_string.i"
8
%include "enums.swg"
9
%include "commondefs.i"
10

    
11
%javaconst(1);
12

    
13
%{
14
#include "nedelement.h"
15
#include "nederror.h"
16
#include "nedparser.h"
17
#include "ned2generator.h"
18
#include "ned1generator.h"
19
#include "xmlgenerator.h"
20
#include "nedelements.h"
21

    
22
#include "neddtdvalidator.h"
23
#include "nedtools.h"
24
#include "nedsyntaxvalidator.h"
25

    
26
// #include "nedcompiler.h"
27
#include "nedfilebuffer.h"
28
// #include "nedsemanticvalidator.h"
29
// #include "cppgenerator.h"
30
%}
31

    
32
// hide export/import macros from swig
33
#define COMMON_API
34
#define NEDXML_API
35
#define OPP_DLLEXPORT
36
#define OPP_DLLIMPORT
37

    
38
#define NAMESPACE_BEGIN
39
#define NAMESPACE_END
40
#define USING_NAMESPACE
41

    
42
namespace std {
43
//class ostream;
44
};
45

    
46
// parse functions return new objects, supposed to be deleted from Java
47
%newobject NEDParser::parseNEDText(const char *);
48
%newobject NEDParser::parseNEDFile(const char *);
49
%newobject NEDParser::parseNEDExpression(const char *);
50
%newobject createElementWithTag(int tagcode, NEDElement *parent);
51

    
52
// These are only public for technical reasons, shouldn't be wrapped
53
%ignore NEDParser::getSource();
54
%ignore NEDParser::getErrors();
55
%ignore NEDParser::error(const char *, int);
56

    
57
%ignore np;
58

    
59
%ignore NEDElementUserData;
60
%ignore NEDElement::setUserData(NEDElementUserData *);
61
%ignore NEDElement::getUserData() const;
62

    
63
%ignore generateNED1(std::ostream&, NEDElement *, NEDErrorStore *);
64
%ignore generateNED2(std::ostream&, NEDElement *, NEDErrorStore *);
65
%ignore generateXML(std::ostream&, NEDElement *, bool, int);
66
%ignore NEDInternalError;
67

    
68
// XXX for some reason, SWIG doesn't give a s&%$# about the following ignores:
69
%ignore NEDElementStore::add(NEDElement *, const char *, ...);
70
%ignore NEDElementStore::add(NEDElement *, int, const char *, ...);
71
%ignore NEDGenerator1::generate(std::ostream&, NEDElement *, const char *);
72
%ignore NEDGenerator2::generate(std::ostream&, NEDElement *, const char *);
73
%ignore NEDXMLGenerator::generate(std::ostream&, NEDElement *);
74

    
75
%ignore ltstr;
76

    
77
%ignore  FilesElement;
78
%ignore  NedFileElement;
79
%ignore  CommentElement;
80
%ignore  ImportElement;
81
%ignore  PropertyDeclElement;
82
%ignore  ExtendsElement;
83
%ignore  InterfaceNameElement;
84
%ignore  SimpleModuleElement;
85
%ignore  ModuleInterfaceElement;
86
%ignore  CompoundModuleElement;
87
%ignore  ChannelInterfaceElement;
88
%ignore  ChannelElement;
89
%ignore  ParametersElement;
90
%ignore  ParamGroupElement;
91
%ignore  ParamElement;
92
%ignore  PatternElement;
93
%ignore  PropertyElement;
94
%ignore  PropertyKeyElement;
95
%ignore  GatesElement;
96
%ignore  GateGroupElement;
97
%ignore  GateElement;
98
%ignore  TypesElement;
99
%ignore  SubmodulesElement;
100
%ignore  SubmoduleElement;
101
%ignore  ConnectionsElement;
102
%ignore  ConnectionElement;
103
%ignore  ChannelSpecElement;
104
%ignore  ConnectionGroupElement;
105
%ignore  LoopElement;
106
%ignore  ConditionElement;
107
%ignore  ExpressionElement;
108
%ignore  OperatorElement;
109
%ignore  FunctionElement;
110
%ignore  IdentElement;
111
%ignore  LiteralElement;
112
%ignore  MsgFileElement;
113
%ignore  NamespaceDeclElement;
114
%ignore  CplusplusElement;
115
%ignore  StructDeclElement;
116
%ignore  ClassDeclElement;
117
%ignore  MessageDeclElement;
118
%ignore  EnumDeclElement;
119
%ignore  EnumElement;
120
%ignore  EnumFieldsElement;
121
%ignore  EnumFieldElement;
122
%ignore  MessageElement;
123
%ignore  ClassElement;
124
%ignore  StructElement;
125
%ignore  FieldsElement;
126
%ignore  FieldElement;
127
%ignore  PropertiesElement;
128
%ignore  MsgpropertyElement;
129
%ignore  UnknownElement;
130

    
131

    
132
/* Let's just grab the original header file here */
133
%include "nedxmldefs.h"
134
%include "nedelement.h"
135
%include "nederror.h"
136
%include "nedparser.h"
137
%include "ned2generator.h"
138
%include "ned1generator.h"
139
%include "xmlgenerator.h"
140
%include "nedelements.h"
141

    
142
%include "nedvalidator.h"
143
%include "neddtdvalidatorbase.h"
144
%include "neddtdvalidator.h"
145
%include "nedtools.h"
146
%include "nedsyntaxvalidator.h"
147

    
148
//%include "nedcompiler.h"
149
//%include "nedfilebuffer.h"
150
//%include "nedsemanticvalidator.h"
151
//%include "cppgenerator.h"
152