1 // Copyright (C) 2006-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __CATALOG_HXX__
21 #define __CATALOG_HXX__
23 #include "YACSlibEngineExport.hxx"
24 #include "RefCounter.hxx"
34 class ComponentDefinition;
37 /*! \brief class for YACS catalogs.
41 class YACSLIBENGINE_EXPORT Catalog : public RefCounter
44 Catalog(const std::string& name);
46 const std::string& getName() const { return _name; }
47 std::string getErrors(){return _errors;}
48 void setErrors(const std::string& errors){_errors=errors;}
49 std::map<std::string,TypeCode*> _typeMap;
50 std::map<std::string,ComponentDefinition*> _componentMap;
51 std::map<std::string,Node*> _nodeMap;
52 std::map<std::string,ComposedNode*> _composednodeMap;
53 Node* getNodeFromNodeMap(std::string name) {return _nodeMap[name];}
59 /*! \brief class for YACS catalog loader.
62 class YACSLIBENGINE_EXPORT CatalogLoader
66 CatalogLoader(const std::string& path);
67 virtual ~CatalogLoader();
68 virtual CatalogLoader* newLoader(const std::string& path)=0 ;
69 virtual void loadCata(Catalog* cata)=0 ;
70 virtual void load(Catalog* cata,const std::string& path) ;