1 // Copyright (C) 2007-2014 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, or (at your option) any later version.
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 _XMEDDATAMODEL_H_
21 #define _XMEDDATAMODEL_H_
23 #include <SALOMEconfig.h>
24 #include CORBA_CLIENT_HEADER(MEDDataManager)
26 #include "MEDOPGUI.hxx"
29 // =================================================================
30 // Definition of an atom in the data model as an implementation of
31 // the virtual class DataObject
32 // =================================================================
34 #include "DataObject.hxx"
35 class MEDOPGUI_EXPORT XmedDataObject: public DataObject {
38 virtual string getPath();
40 void setFieldHandler(MEDOP::FieldHandler fieldHandler);
41 MEDOP::FieldHandler * getFieldHandler();
43 static const int NB_TYPE_OF_FIELDS = 4;
44 static const char * mapTypeOfFieldLabel[NB_TYPE_OF_FIELDS];
47 MEDOP::FieldHandler _fieldHandler;
48 string _getTypedFieldLabel();
52 // =================================================================
53 // Definition of the data model as an implementation of the virtual
54 // class DataModel. It implements the DataObject factory.
55 // =================================================================
57 #include "DataModel.hxx"
58 class MEDOPGUI_EXPORT XmedDataModel: public DataModel {
60 XmedDataModel():DataModel() {};
61 virtual DataObject * newDataObject();
65 // =================================================================
66 // Base class for data processing
67 // =================================================================
70 // 1) Create an instance, call the "process" function,
71 // then get the result you are interested in, using the corresponding
72 // "result*" function.
74 // 2) Alternativly, you can just call directly the suitable master
75 // "get*" function to process and get the result you are interested
78 #include "DataProcessor.hxx"
80 class MEDOPGUI_EXPORT XmedDataProcessor : public DataProcessor {
82 XmedDataProcessor(DataModel * dataModel):DataProcessor(dataModel) {};
84 MEDOP::FieldHandlerList * getResultingFieldHandlerList();
85 MEDOP::FieldIdList * getResultingFieldIdList();
88 virtual void preprocess(QStringList itemNameIdList);
89 virtual void processDataObject(DataObject * dataObject);
92 MEDOP::FieldHandlerList_var _resultingFieldHandlerList;
93 MEDOP::FieldIdList_var _resultingFieldIdList;
99 #endif // _XMEDDATAMODEL_H_