source: XMLIO_V2/dev/common/src/xmlio/array.hpp @ 219

Last change on this file since 219 was 219, checked in by hozdoba, 13 years ago

Préparation nouvelle arborescence

File size: 1.8 KB
Line 
1#ifndef __XMLIO_CArray__
2#define __XMLIO_CArray__
3
4/// boost headers ///
5#include <boost/cstdint.hpp>
6#include <boost/shared_ptr.hpp>
7#include <boost/multi_array.hpp>
8
9/// xmlioserver headers ///
10#include "xmlioserver_spl.hpp"
11
12namespace xmlioserver
13{
14   /// ////////////////////// Déclarations ////////////////////// ///
15   template <typename ValueType, StdSize  NumDims,
16             typename Allocator = std::allocator<ValueType> >
17      class CArray
18         : public boost::multi_array<ValueType, NumDims, Allocator>
19   {
20         /// Définition de type ///
21         typedef boost::multi_array<ValueType, NumDims, Allocator> SuperClass;
22
23      public:
24
25         typedef ValueType ValType;
26
27         /// Constructeurs ///
28         template <typename ExtentList>
29            explicit CArray(const ExtentList & sizes);
30
31         template <typename ExtentList>
32            CArray(const ExtentList & sizes, const boost::general_storage_order<NumDims> & store);
33
34         CArray(const CArray & array);       // NEVER IMPLEMENTED.
35         CArray(const CArray * const array); // NEVER IMPLEMENTED.
36
37      public:
38     
39         /// Flux ///
40         template <typename U, StdSize V, typename W>
41            friend StdOStream & operator << 
42                  (StdOStream & os, const CArray<U, V, W> & array);
43
44         template <typename U, StdSize V, typename W>
45            friend StdIStream & operator >> 
46                  (StdIStream & is, CArray<U, V, W> & array);
47
48      public:
49
50         void toBinary  (StdOStream & os) const;
51         void fromBinary(StdIStream & is);
52
53         /// Destructeur ///
54         virtual ~CArray(void);
55
56   }; // class CArray
57
58   ///---------------------------------------------------------------
59
60} // namespace xmlioserver
61
62#include "array_impl.hpp"
63#include "array_mac.hpp"
64
65#endif // __XMLIO_CArray__
Note: See TracBrowser for help on using the repository browser.