torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VerilogExporter.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 /// \file
17 /// \brief Header for the VerilogExporter class.
18 
19 #ifndef TORC_GENERIC_VERILOG_VERILOGEXPORTER_HPP
20 #define TORC_GENERIC_VERILOG_VERILOGEXPORTER_HPP
21 
22 #include "torc/generic/Root.hpp"
23 #include <boost/filesystem.hpp>
24 #include <string>
25 #include <vector>
26 
27 namespace torc {
28 namespace generic {
29 
30 namespace generic { class VerilogExporterUnitTest; }
31 
32  /// \brief Exporter from a generic netlist into structural verilog.
34  protected:
35  // friends
36  /// \brief The unit test class has access to our internals.
38  // types
39  /// \brief Imported type name.
41  // members
42  /// \brief Root of the generic netlist.
44  public:
45  // constructors
46  /// \brief Public constructor.
47  VerilogExporter(RootSharedPtr inRootPtr);
48  // operators
49  /// \brief Export Verilog to a file.
50  /// \param inFilename Output file name.
51  /// \returns true if successfully exported.
52  bool operator()(const boost::filesystem::path& inFilename);
53  /// \brief Export Verilog to an output stream.
54  /// \param inOutputStream.
55  /// \returns true if successfully exported.
56  bool operator()(std::ostream& inOutputStream = std::cout);
57  };
58 
59 } // namespace generic
60 } // namespace torc
61 
62 #endif // TORC_GENERIC_VERILOG_VERILOGEXPORTER_HPP
friend class torc::generic::generic::VerilogExporterUnitTest
The unit test class has access to our internals.
RootSharedPtr mRootPtr
Root of the generic netlist.
VerilogExporter(RootSharedPtr inRootPtr)
Public constructor.
std::string string
bool operator()(const boost::filesystem::path &inFilename)
Export Verilog to a file.
std::string string
Imported type name.
boost::filesystem::path path
Exporter from a generic netlist into structural verilog.
boost::shared_ptr< Root > RootSharedPtr