1 // Copyright (C) 2007-2016 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 "MEDCALCGUI.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 MEDCALCGUI_EXPORT XmedDataObject: public DataObject {
38 virtual string getPath();
40 void setFieldHandler(MEDCALC::FieldHandler fieldHandler);
41 MEDCALC::FieldHandler * getFieldHandler();
44 MEDCALC::FieldHandler _fieldHandler;
45 string _getTypedFieldLabel();
49 // =================================================================
50 // Definition of the data model as an implementation of the virtual
51 // class DataModel. It implements the DataObject factory.
52 // =================================================================
54 #include "DataModel.hxx"
55 class MEDCALCGUI_EXPORT XmedDataModel: public DataModel {
57 XmedDataModel():DataModel() {};
58 virtual DataObject * newDataObject();
62 // =================================================================
63 // Base class for data processing
64 // =================================================================
67 // 1) Create an instance, call the "process" function,
68 // then get the result you are interested in, using the corresponding
69 // "result*" function.
71 // 2) Alternativly, you can just call directly the suitable master
72 // "get*" function to process and get the result you are interested
75 #include "DataProcessor.hxx"
77 class MEDCALCGUI_EXPORT XmedDataProcessor : public DataProcessor {
79 XmedDataProcessor(DataModel * dataModel):DataProcessor(dataModel) {};
81 MEDCALC::FieldHandlerList * getResultingFieldHandlerList();
82 MEDCALC::FieldIdList * getResultingFieldIdList();
85 virtual void preprocess(QStringList itemNameIdList);
86 virtual void processDataObject(DataObject * dataObject);
89 MEDCALC::FieldHandlerList_var _resultingFieldHandlerList;
90 MEDCALC::FieldIdList_var _resultingFieldIdList;
96 #endif // _XMEDDATAMODEL_H_