torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::EdifParser Class Reference

The Top level parser for parsing EDIF files. More...

#include <EdifParser.hpp>

+ Inheritance diagram for torc::generic::EdifParser:

Public Member Functions

void parse (const std::string &inFileName, const RootSharedPtr &outRoot, const LinkerSharedPtr &outLinker, const ObjectFactorySharedPtr &inFactory, const ParserOptions &inOptions) throw (Error)
 
void parse (const std::vector< std::string > &inFileNames, const RootSharedPtr &outRoot, const LinkerSharedPtr &outLinker, const ObjectFactorySharedPtr &inFactory, const ParserOptions &inOptions) throw (Error)
 
 EdifParser ()
 
 EdifParser (const EdifParser &inSource)
 
virtual ~EdifParser () throw ()
 
EdifParseroperator= (const EdifParser &inSource)
 

Detailed Description

The Top level parser for parsing EDIF files.

Most of this class will be generated during implementation. This document will be updated accordingly.

Definition at line 41 of file EdifParser.hpp.

Constructor & Destructor Documentation

torc::generic::EdifParser::EdifParser ( )

Definition at line 30 of file EdifParser.cpp.

30 {}
torc::generic::EdifParser::EdifParser ( const EdifParser inSource)

Definition at line 34 of file EdifParser.cpp.

34 {}
torc::generic::EdifParser::~EdifParser ( )
throw (
)
virtual

Definition at line 32 of file EdifParser.cpp.

32 {}

Member Function Documentation

EdifParser & torc::generic::EdifParser::operator= ( const EdifParser inSource)

Definition at line 36 of file EdifParser.cpp.

36  {
37  return *this;
38 }
void torc::generic::EdifParser::parse ( const std::string &  inFileName,
const RootSharedPtr outRoot,
const LinkerSharedPtr outLinker,
const ObjectFactorySharedPtr inFactory,
const ParserOptions inOptions 
)
throw (Error
)

Parse a given edif file

Parameters
[in]inFileNameName of file to be parsed
[out]outRootRoot to be populated
[out]outLinkerLinker to be used for this parse
[in]inFactoryFactory object to be used for parsing
[in]inOptionsOptions to the parser

Definition at line 40 of file EdifParser.cpp.

42  {
43  EdifContextSharedPtr context(new EdifContext(outRoot, outLinker, inFactory, inOptions));
44  if(!outRoot || !outLinker || !inFactory) {
45  Error e(eMessageIdErrorNullPointer, __FUNCTION__, __FILE__, __LINE__);
46  throw;
47  }
48  Driver parserDriver(context);
49  if(false == parserDriver.parseFile(inFileName)) {
50  throw parserDriver.getParserError();
51  }
52  return;
53 }
boost::shared_ptr< EdifContext > EdifContextSharedPtr

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::generic::EdifParser::parse ( const std::vector< std::string > &  inFileNames,
const RootSharedPtr outRoot,
const LinkerSharedPtr outLinker,
const ObjectFactorySharedPtr inFactory,
const ParserOptions inOptions 
)
throw (Error
)

Parse a given set of edif files

Parameters
[in]inFileNamesNames of file to be parsed
[out]outRootRoot to be populated
[out]outLinkerLinker to be used for this parse
[in]inFactoryFactory object to be used for parsing
[in]inOptionsOptions to the parser

Definition at line 55 of file EdifParser.cpp.

57  {
58  std::vector<std::string>::const_iterator it = inFileNames.begin();
59  std::vector<std::string>::const_iterator end = inFileNames.end();
60  try {
61  for(; it != end; ++it) {
62  parse(*it, outRoot, outLinker, inFactory, inOptions);
63  }
64  } catch(Error& e) {
65  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
66  throw;
67  }
68 }
void parse(const std::string &inFileName, const RootSharedPtr &outRoot, const LinkerSharedPtr &outLinker, const ObjectFactorySharedPtr &inFactory, const ParserOptions &inOptions)
Definition: EdifParser.cpp:40

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: