torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EdifParser.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 #ifndef TORC_GENERIC_EDIF_EDIFPARSER_HPP
17 #define TORC_GENERIC_EDIF_EDIFPARSER_HPP
18 
19 //BOOST
20 #include <boost/shared_ptr.hpp>
21 
24 #include "torc/generic/Error.hpp"
25 
26 namespace torc { namespace generic { class ObjectFactory; } }
27 namespace torc { namespace generic { class ParserOptions; } }
28 namespace torc { namespace generic { class Root; } }
29 namespace torc { namespace generic { class Linker; } }
30 
31 
32 namespace torc {
33 namespace generic {
34 
35 /**
36  * @brief The Top level parser for parsing EDIF files.
37  *
38  * Most of this class will be generated during implementation. This document will be updated
39  * accordingly.
40  */
41 class EdifParser {
42 public:
43 
44  /**
45  * Parse a given edif file
46  * @param[in] inFileName Name of file to be parsed
47  * @param[out] outRoot Root to be populated
48  * @param[out] outLinker Linker to be used for this parse
49  * @param[in] inFactory Factory object to be used for parsing
50  * @param[in] inOptions Options to the parser
51  */
52  void parse(const std::string& inFileName, const RootSharedPtr& outRoot,
53  const LinkerSharedPtr& outLinker, const ObjectFactorySharedPtr& inFactory,
54  const ParserOptions& inOptions) throw (Error);
55 
56  /**
57  * Parse a given set of edif files
58  * @param[in] inFileNames Names of file to be parsed
59  * @param[out] outRoot Root to be populated
60  * @param[out] outLinker Linker to be used for this parse
61  * @param[in] inFactory Factory object to be used for parsing
62  * @param[in] inOptions Options to the parser
63  */
64  void parse(const std::vector<std::string>& inFileNames, const RootSharedPtr& outRoot,
65  const LinkerSharedPtr& outLinker, const ObjectFactorySharedPtr& inFactory,
66  const ParserOptions& inOptions) throw (Error);
67 
68  EdifParser();
69  EdifParser(const EdifParser& inSource);
70 
71  virtual ~EdifParser() throw ();
72 
73  EdifParser& operator=(const EdifParser& inSource);
74 };
75 
76 } // namespace generic
77 } // namespace torc
78 
79 #endif // TORC_GENERIC_EDIF_EDIFPARSER_HPP
The Top level parser for parsing EDIF files.
Definition: EdifParser.hpp:41
boost::shared_ptr< Linker > LinkerSharedPtr
boost::shared_ptr< ObjectFactory > ObjectFactorySharedPtr
std::string string
The Error object thrown by different methods of EdifOM.
Definition: Error.hpp:41
EdifParser & operator=(const EdifParser &inSource)
Definition: EdifParser.cpp:36
boost::shared_ptr< Root > RootSharedPtr
void parse(const std::string &inFileName, const RootSharedPtr &outRoot, const LinkerSharedPtr &outLinker, const ObjectFactorySharedPtr &inFactory, const ParserOptions &inOptions)
Definition: EdifParser.cpp:40