00001 // Torc - Copyright 2011 University of Southern California. All Rights Reserved. 00002 // $HeadURL: https://torc-isi.svn.sourceforge.net/svnroot/torc-isi/branches/staging/0.9/src/torc/generic/parser/EdifParser.hpp $ 00003 // $Id: EdifParser.hpp 10 2011-10-12 18:40:16Z nsteiner $ 00004 00005 // This program is free software: you can redistribute it and/or modify it under the terms of the 00006 // GNU General Public License as published by the Free Software Foundation, either version 3 of the 00007 // License, or (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 00010 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 00011 // the GNU General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License along with this program. If 00014 // not, see <http://www.gnu.org/licenses/>. 00015 00016 #ifndef TORC_GENERIC_PARSER_EDIFPARSER_HPP 00017 #define TORC_GENERIC_PARSER_EDIFPARSER_HPP 00018 00019 //BOOST 00020 #include <boost/shared_ptr.hpp> 00021 00022 #include "torc/generic/om/PointerTypes.hpp" 00023 #include "torc/generic/parser/ParserPointerTypes.hpp" 00024 #include "torc/generic/util/Error.hpp" 00025 00026 namespace torc { namespace generic { class ObjectFactory; } } 00027 namespace torc { namespace generic { class ParserOptions; } } 00028 namespace torc { namespace generic { class Root; } } 00029 namespace torc { namespace generic { class Linker; } } 00030 00031 namespace torc { 00032 00033 namespace generic { 00034 00035 /** 00036 * @brief The Top level parser for parsing EDIF files. 00037 * 00038 * Most of this class will be generated during implementation. This document will be updated acoordingly. 00039 */ 00040 class EdifParser 00041 { 00042 public: 00043 00044 /** 00045 * Parse a given edif file 00046 * @param[in] inFileName Name of file to be parsed 00047 * @param[out] outRoot Root to be populated 00048 * @param[out] outLinker Linker to be used for this parse 00049 * @param[in] inFactory Factory object to be used for parsing 00050 * @param[in] inOptions Options to the parser 00051 */ 00052 void 00053 parse(const std::string &inFileName, 00054 const RootSharedPtr &outRoot, 00055 const LinkerSharedPtr &outLinker, 00056 const ObjectFactorySharedPtr &inFactory, 00057 const ParserOptions &inOptions) throw(Error); 00058 00059 /** 00060 * Parse a given set of edif files 00061 * @param[in] inFileNames Names of file to be parsed 00062 * @param[out] outRoot Root to be populated 00063 * @param[out] outLinker Linker to be used for this parse 00064 * @param[in] inFactory Factory object to be used for parsing 00065 * @param[in] inOptions Options to the parser 00066 */ 00067 void 00068 parse(const std::vector<std::string> &inFileNames, 00069 const RootSharedPtr &outRoot, 00070 const LinkerSharedPtr &outLinker, 00071 const ObjectFactorySharedPtr &inFactory, 00072 const ParserOptions &inOptions) throw(Error); 00073 00074 EdifParser(); 00075 EdifParser(const EdifParser &inSource); 00076 00077 virtual 00078 ~EdifParser() throw(); 00079 00080 EdifParser & 00081 operator=(const EdifParser &inSource) throw(); 00082 }; 00083 00084 } // namespace torc::generic 00085 00086 } // namespace torc 00087 #endif // TORC_GENERIC_PARSER_EDIFPARSER_HPP