1 // Copyright (C) 2007-2024 CEA, EDF
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 std::string getPath();
40 void setFieldHandler(MEDCALC::FieldHandler fieldHandler);
41 MEDCALC::FieldHandler * getFieldHandler();
43 void setPresentationId(int presId);
44 int getPresentationId() const;
47 MEDCALC::FieldHandler _fieldHandler;
49 std::string _getTypedFieldLabel();
53 // =================================================================
54 // Definition of the data model as an implementation of the virtual
55 // class DataModel. It implements the DataObject factory.
56 // =================================================================
58 #include "DataModel.hxx"
59 class MEDCALCGUI_EXPORT XmedDataModel: public DataModel {
61 XmedDataModel():DataModel() {};
62 virtual DataObject * newDataObject();
66 // =================================================================
67 // Base class for data processing
68 // =================================================================
71 // 1) Create an instance, call the "process" function,
72 // then get the result you are interested in, using the corresponding
73 // "result*" function.
75 // 2) Alternatively, you can just call directly the suitable master
76 // "get*" function to process and get the result you are interested
79 #include "DataProcessor.hxx"
81 class MEDCALCGUI_EXPORT XmedDataProcessor : public DataProcessor {
83 XmedDataProcessor(DataModel * dataModel):DataProcessor(dataModel) {};
84 virtual ~XmedDataProcessor() {};
86 MEDCALC::FieldHandlerList * getResultingFieldHandlerList();
87 MEDCALC::FieldIdList * getResultingFieldIdList();
90 virtual void preprocess(QStringList itemNameIdList);
91 virtual void processDataObject(DataObject * dataObject);
94 MEDCALC::FieldHandlerList_var _resultingFieldHandlerList;
95 MEDCALC::FieldIdList_var _resultingFieldIdList;
101 #endif // _XMEDDATAMODEL_H_