|
degate 0.1.1
|
00001 /* -*-c++-*- 00002 00003 This file is part of the IC reverse engineering tool degate. 00004 00005 Copyright 2008, 2009, 2010 by Martin Schobert 00006 00007 Degate is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 any later version. 00011 00012 Degate is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with degate. If not, see <http://www.gnu.org/licenses/>. 00019 00020 */ 00021 00022 #ifndef __GATELIBRARYIMPORTER_H__ 00023 #define __GATELIBRARYIMPORTER_H__ 00024 00025 #include "globals.h" 00026 #include "GateLibrary.h" 00027 #include "XMLImporter.h" 00028 00029 #include <stdexcept> 00030 00031 namespace degate { 00032 00033 /** 00034 * The GateLibraryImporter imports a gate library. That is the file 00035 * gate_library.xml from your degate project. 00036 */ 00037 00038 class GateLibraryImporter : public XMLImporter { 00039 private: 00040 00041 GateLibrary_shptr parse_gate_library_element(const xmlpp::Element * const gl_element, 00042 std::string const& directory); 00043 00044 void parse_gate_templates_element(const xmlpp::Element * const gate_templates_element, 00045 GateLibrary_shptr gate_lib, 00046 std::string const& directory); 00047 00048 00049 void parse_template_images_element(const xmlpp::Element * const template_images_element, 00050 GateTemplate_shptr gate_tmpl, 00051 std::string const& directory); 00052 00053 void parse_template_implementations_element(const xmlpp::Element * const implementations_element, 00054 GateTemplate_shptr gate_tmpl, 00055 std::string const& directory); 00056 00057 00058 void parse_template_ports_element(const xmlpp::Element * const template_ports_element, 00059 GateTemplate_shptr gate_tmpl, 00060 GateLibrary_shptr gate_lib); 00061 00062 public: 00063 GateLibraryImporter() {} 00064 ~GateLibraryImporter() {} 00065 00066 GateLibrary_shptr import(std::string const& filename); 00067 00068 }; 00069 00070 } 00071 #endif
1.7.4