source: Sophya/trunk/SophyaPI/PIext/nomtarradapter.h@ 2930

Last change on this file since 2930 was 2930, checked in by ansari, 19 years ago

Instanciation explicite Adapterde NamedObjMgr et enregsitrement pour la prise en charge des tableaux (TArray/TMatrix/TVector) de type <int_2> <uint_2> <int_8> - Reza 3/4/2006

File size: 1.6 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Adaptateur d objets (pour NamedObjMgr)
3// pour les classes TMatrix<T>, TVector<T> de Sophya
4// Reza 11/99
5// LAL-IN2P3/CNRS CEA-DAPNIA
6
7#ifndef NOMTARRAYADAPTER_H_SEEN
8#define NOMTARRAYADAPTER_H_SEEN
9
10#include "nomgadapter.h"
11#include "tarray.h"
12
13//---------------------------------------------------------------
14// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet TArray
15//---------------------------------------------------------------
16
17template <class T>
18class NOMAdapter_TArray : public NObjMgrAdapter {
19public:
20 NOMAdapter_TArray(TArray<T>* m = NULL);
21 virtual ~NOMAdapter_TArray();
22
23 virtual NObjMgrAdapter* Clone(AnyDataObj* o);
24
25 virtual string GetDataObjType();
26
27 virtual AnyDataObj* CloneDataObj(bool share=false);
28
29 virtual void SavePPF(POutPersist& s, string const & nom);
30
31 virtual void Print(ostream& os);
32 virtual PIDrawer* GetDrawer(string& dopt);
33 virtual P2DArrayAdapter* Get2DArray(string& dopt);
34 virtual NTupleInterface* GetNTupleInterface(bool& adel);
35
36protected:
37 TArray<T>* mArr;
38};
39
40// Class Interface NTuple pour TArray<T>
41
42template <class T>
43class NTupInt_TArray : public NTupleInterface {
44public:
45 NTupInt_TArray(TArray<T>* m);
46 virtual ~NTupInt_TArray();
47 virtual sa_size_t NbLines() const ;
48 virtual sa_size_t NbColumns() const ;
49 virtual r_8 * GetLineD(sa_size_t n) const ;
50 virtual string VarList_C(const char* nomx=NULL) const ;
51protected:
52 TArray<T>* mArr;
53 mutable r_8 mRet[11];
54};
55
56
57#endif
Note: See TracBrowser for help on using the repository browser.