]> SALOME platform Git repositories - modules/kernel.git/blob - src/Container/SALOME_DataContainer_i.hxx
Salome HOME
create_python_service_instance(): meaningful implementation in
[modules/kernel.git] / src / Container / SALOME_DataContainer_i.hxx
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SALOME DataContainer : implementation of data container
24 //  File   : SALOME_DataContainer_i.hxx
25 //  Author : Mikhail PONIKAROV
26 //  Module : SALOME
27 //  $Header$
28 //
29 #ifndef _SALOME_DATACONTAINER_I_HXX_
30 #define _SALOME_DATACONTAINER_I_HXX_
31
32 #include "SALOME_Container.hxx"
33
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOME_Component)
36
37 #include <string>
38
39 class CONTAINER_EXPORT Engines_DataContainer_i:
40   public POA_Engines::DataContainer
41 {
42 public:
43   Engines_DataContainer_i();
44   Engines_DataContainer_i(const char* url,
45                           const char* name,
46                           const char* identifier,
47                           const bool removeAfterGet);
48
49   Engines_DataContainer_i(char* stream,
50                           const int   streamSize,
51                           const char* name,
52                           const char* identifier,
53                           const bool removeAfterGet);
54   virtual ~Engines_DataContainer_i();
55
56   // --- CORBA methods
57   virtual Engines::TMPFile* get();
58   virtual char* name();
59   virtual char* identifier();
60   virtual char* extension();
61   virtual void  setExtension(const char* theExt);
62             
63 protected:
64
65   std::string myExt;        ///< extension (type) of the file
66   std::string myName;       ///< name of the document corresponding to this data
67   std::string myIdentifier; ///< module identifier of the document corresponding to this data
68   std::string myURL;        ///< path to the locally located file
69   bool        myRemoveAfterGet; ///< if this flag is true, file must be removed after the first "get" method call
70   char*       myStream;     ///< if it is not NULL, data must be get from this stream, not from the file
71   int         myStreamSize; ///< size (in bytes) if the stream in myStream
72 };
73
74 #endif