X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleCatalog%2FSALOME_ModuleCatalog_Parser.hxx;h=3bc5da5719f89773046457a0ddf24ad95c4b28cd;hb=a7a1147d4b4b217c5eee783f67e6748610d4a614;hp=236763abb839a78225953a758ce0b64fc2f30701;hpb=bdc2eedf20845a4cd03985e0c06d167f613abaca;p=modules%2Fkernel.git diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx index 236763abb..3bc5da571 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser.hxx @@ -1,98 +1,138 @@ -// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + +// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Parser.hxx // Author : Estelle Deville // Module : SALOME // $Header$ - +// #ifndef SALOME_CATALOG_PARSER_H #define SALOME_CATALOG_PARSER_H #include #include +#include // Type Definitions struct ParserPathPrefix { - string path; - vector ListOfComputer ; + std::string path; + std::vector listOfComputer ; }; -typedef vector ListOfParserPathPrefix ; +typedef std::vector ParserPathPrefixes ; enum ParserComponentType {GEOM, MESH, Med, SOLVER, DATA, VISU, SUPERV, OTHER} ; -struct ParserServParam +struct ParserParameter +{ + std::string type; + std::string name; +} ; + + +struct ParserDataStreamParameter { - string ParserParamtype; - string ParserParamname; + std::string type; + std::string name; + std::string dependency; } ; -typedef vector ListOfParserServicesParameter; +typedef std::vector ParserParameters; +typedef std::vector ParserDataStreamParameters; struct ParserService { - string ParserServiceName; - ListOfParserServicesParameter ParserServiceinParameter; - ListOfParserServicesParameter ParserServiceoutParameter; - bool ParserServicebydefault; + ParserService() { + typeOfNode = 1; + byDefault = 1; + } + std::string name; + ParserParameters inParameters; + ParserParameters outParameters; + ParserDataStreamParameters inDataStreamParameters; + ParserDataStreamParameters outDataStreamParameters; + bool byDefault; + bool typeOfNode; } ; -typedef vector ListOfParserServices ; +typedef std::vector ParserServices ; -struct ParserDefInterface +struct ParserInterface { - string Parserinterfacename ; - ListOfParserServices Parserinterfaceservicelist ; + std::string name ; + ParserServices services ; } ; -typedef vector ListOfDefinitionInterface; +typedef std::vector ParserInterfaces; struct ParserComponent { - string Parsercomponentname; - string Parsercomponentusername; - ParserComponentType Parsercomponenttype; - bool Parsercomponentmultistudy ; - string Parsercomponenticone; - ListOfDefinitionInterface ParserListInterface; - string Parserconstraint ; + std::string name; + std::string username; + ParserComponentType type; + bool multistudy; + std::string icon; + std::string constraint; + ParserInterfaces interfaces; + ParserPathPrefixes prefixes; + std::string implementationType; + std::string implementationName; + std::string version; + std::string comment; }; -typedef vector ListOfParserComponent ; +typedef std::vector ParserComponents ; -#ifdef WRITE_CATA_COMPONENT -// contains all the paths and the computers defined in the catalog -ListOfParserPathPrefix _pathlist; - -// contains all the modules defined in the catalog -ListOfParserComponent _modulelist; -#else -extern ListOfParserPathPrefix _pathlist; -extern ListOfParserComponent _modulelist; -#endif +struct ParserType +{ + std::string name; + std::string kind; + std::string id; + std::string content; + std::vector bases; + std::vector< std::pair > members; +}; +typedef std::map ParserTypes ; +typedef std::map RefTypes ; +typedef std::vector TypeList ; + +struct ParserSequence:public ParserType +{ + ParserSequence(){kind="sequence";} +}; +typedef std::map ParserSequences ; +struct ParserObjref:public ParserType +{ + ParserObjref(){kind="objref";} +}; +typedef std::map ParserObjrefs ; +struct ParserStruct:public ParserType +{ + ParserStruct(){kind="struct";} +}; +typedef std::map ParserStructs ; #endif // SALOME_CATALOG_PARSER_H