OMNeT++ NEDXML  6.0.3
omnetpp::nedxml Namespace Reference

Namespaces

 msgyyutil
 
 nedyyutil
 

Classes

class  ASTBuilder
 SAX handler (to be used with SAXParser) that builds an AST. More...
 
class  ASTNode
 
class  ASTNodeFactory
 Base class for ASTNode factories. More...
 
class  ASTNodeUtil
 Various utilities for the ASTNode tree. More...
 
class  DtdValidationUtils
 
class  ErrorStore
 
struct  FileLine
 
struct  LineColumn
 
class  MsgAnalyzer
 Part of the message compiler. Produces ClassInfo/EnumInfo objects from the ASTNode tree. Assumes object tree has already passed all validation stages (DTD, syntax, semantic). More...
 
class  MsgCodeGenerator
 Code generator part of the message compiler. More...
 
class  MsgCompiler
 Generates C++ code from a MSG file object tree. More...
 
struct  MsgCompilerOptions
 Options for MsgCompiler. More...
 
class  MsgGenerator
 Generates MSG source from an AST. More...
 
class  MsgParser
 Parses MSG files into an AST. More...
 
class  MsgTool
 
class  MsgTypeTable
 
class  NedCrossValidator
 Performs cross validation. Should be called after tree passed DTD validation and syntax validation. More...
 
class  NedException
 Low-level routines throw an exception instead of calling NedErrorStore->add(). More...
 
class  NedGenerator
 Generates NED code from a NED AST. More...
 
struct  NedLookupContext
 Context of NED type lookup, for NedResourceCache. More...
 
class  NedParser
 Parses NED files into an AST. More...
 
class  NedResourceCache
 Stores loaded NED files, and keeps track of components in them. More...
 
class  NedSyntaxValidator
 Performs structural validation of components. More...
 
class  NedTool
 
class  NedTools
 Misc NED utilities. More...
 
class  NedTypeInfo
 Stores information on a NED type. More...
 
struct  ParseContext
 
class  SourceDocument
 Stores the full text of a NED/MSG file. More...
 
struct  SourceRegion
 Stores a line:col..line:col region in a source file. Used for mapping ASTNodes back to the source code. More...
 
class  UserData
 Subclass from this if you want to attach extra data to ASTNode objects. More...
 
class  XMLGenerator
 Serializes an AST in XML format. More...
 
struct  YYLoc
 

Typedefs

typedef ASTNode NedElement
 
typedef ASTNode MsgElement
 

Enumerations

enum  ProblemSeverity { SEVERITY_INFO, SEVERITY_WARNING, SEVERITY_ERROR }
 

Functions

void NedInternalError (const char *file, int line, ASTNode *context, const char *messagefmt,...)
 
NEDXML_API void generateMsg (std::ostream &out, ASTNode *node)
 Simple front-end to MsgGenerator. More...
 
NEDXML_API void generateNed (std::ostream &out, ASTNode *node)
 Simple front-end to NedGenerator. More...
 
NEDXML_API ASTNodeparseXML (const char *filename, ErrorStore *errors)
 Simple front-end to load an AST from an XML file. Invokes SAXParser with ASTBuilder. More...
 
NEDXML_API void generateXML (std::ostream &out, ASTNode *tree, bool srcloc, int indentsize=4)
 Simple front-end to XMLGenerator. More...
 
NEDXML_API std::string generateXML (ASTNode *tree, bool srcloc, int indentsize=4)
 Simple front-end to XMLGenerator. More...
 
std::string slashifyFilename (const char *fname)
 
const char * currentLocation (ParseContext *np)
 
ASTNodecreateElementWithTag (ParseContext *np, ASTNodeFactory *factory, int tagcode, ASTNode *parent=nullptr)
 
ASTNodegetOrCreateElementWithTag (ParseContext *np, ASTNodeFactory *factory, int tagcode, ASTNode *parent)
 
void storePos (ParseContext *np, ASTNode *node, YYLoc pos)
 
void storePos (ParseContext *np, ASTNode *node, YYLoc firstpos, YYLoc lastpos)
 
void swapAttributes (ASTNode *node, const char *attr1, const char *attr2)
 
void transferChildren (ASTNode *from, ASTNode *to)
 
YYLoc trimQuotes (YYLoc vectorpos)
 
YYLoc trimDoubleBraces (YYLoc vectorpos)
 
const char * toString (ParseContext *np, YYLoc)
 
const char * toString (long)
 
std::string removeSpaces (ParseContext *np, YYLoc pos)
 
bool isEmpty (YYLoc pos)
 
YYLoc makeYYLoc (int fl, int fc, int ll, int lc)
 
YYLoc makeEmptyYYLoc ()
 

Variables

LineColumn pos
 
LineColumn prevpos
 
bool parseInProgress
 

Typedef Documentation

◆ NedElement

◆ MsgElement

Enumeration Type Documentation

◆ ProblemSeverity

Enumerator
SEVERITY_INFO 
SEVERITY_WARNING 
SEVERITY_ERROR 

Function Documentation

◆ NedInternalError()

void omnetpp::nedxml::NedInternalError ( const char *  file,
int  line,
ASTNode context,
const char *  messagefmt,
  ... 
)

Called when an internal error occurs. It prints an appropriate message, then calls abort(). This method is typically used via the INTERNAL_ERROR0()...INTERNAL_ERROR4() macros that add the FILE, LINE args implicitly.

◆ generateMsg()

NEDXML_API void omnetpp::nedxml::generateMsg ( std::ostream &  out,
ASTNode node 
)

Simple front-end to MsgGenerator.

◆ slashifyFilename()

std::string omnetpp::nedxml::slashifyFilename ( const char *  fname)

◆ currentLocation()

const char* omnetpp::nedxml::currentLocation ( ParseContext np)

◆ createElementWithTag()

ASTNode* omnetpp::nedxml::createElementWithTag ( ParseContext np,
ASTNodeFactory factory,
int  tagcode,
ASTNode parent = nullptr 
)

◆ getOrCreateElementWithTag()

ASTNode* omnetpp::nedxml::getOrCreateElementWithTag ( ParseContext np,
ASTNodeFactory factory,
int  tagcode,
ASTNode parent 
)

◆ storePos() [1/2]

void omnetpp::nedxml::storePos ( ParseContext np,
ASTNode node,
YYLoc  pos 
)

◆ storePos() [2/2]

void omnetpp::nedxml::storePos ( ParseContext np,
ASTNode node,
YYLoc  firstpos,
YYLoc  lastpos 
)

◆ swapAttributes()

void omnetpp::nedxml::swapAttributes ( ASTNode node,
const char *  attr1,
const char *  attr2 
)

◆ transferChildren()

void omnetpp::nedxml::transferChildren ( ASTNode from,
ASTNode to 
)

◆ trimQuotes()

YYLoc omnetpp::nedxml::trimQuotes ( YYLoc  vectorpos)

◆ trimDoubleBraces()

YYLoc omnetpp::nedxml::trimDoubleBraces ( YYLoc  vectorpos)

◆ toString() [1/2]

const char* omnetpp::nedxml::toString ( ParseContext np,
YYLoc   
)

◆ toString() [2/2]

const char* omnetpp::nedxml::toString ( long  )

◆ removeSpaces()

std::string omnetpp::nedxml::removeSpaces ( ParseContext np,
YYLoc  pos 
)

◆ isEmpty()

bool omnetpp::nedxml::isEmpty ( YYLoc  pos)
inline

References pos.

◆ makeYYLoc()

YYLoc omnetpp::nedxml::makeYYLoc ( int  fl,
int  fc,
int  ll,
int  lc 
)
inline

References pos.

Referenced by makeEmptyYYLoc().

◆ makeEmptyYYLoc()

YYLoc omnetpp::nedxml::makeEmptyYYLoc ( )
inline

References makeYYLoc().

Variable Documentation

◆ pos

Referenced by isEmpty(), and makeYYLoc().

◆ prevpos

LineColumn prevpos

◆ parseInProgress

bool parseInProgress