source:
branches/2012/dev_r3406_LOCEAN4_XIOS/NEMOGCM/EXTERNAL/XIOS/src/type/type.hpp
@
3430
Last change on this file since 3430 was 3428, checked in by rblod, 12 years ago | |
---|---|
File size: 1.6 KB |
Line | |
---|---|
1 | #ifndef __XIOS_TYPE__ |
2 | #define __XIOS_TYPE__ |
3 | |
4 | #include "xmlioserver_spl.hpp" |
5 | #include "exception.hpp" |
6 | #include "buffer_in.hpp" |
7 | #include "buffer_out.hpp" |
8 | #include "base_type.hpp" |
9 | |
10 | |
11 | namespace xios |
12 | { |
13 | |
14 | template <typename T> |
15 | class CType : public CBaseType |
16 | { |
17 | public: |
18 | |
19 | CType(void) ; |
20 | CType(const T& val) ; |
21 | CType(T& val) ; |
22 | CType(const CType& type) ; |
23 | |
24 | ~CType() {} ; |
25 | |
26 | void fromString(const string& str) ; |
27 | string toString(void) const; |
28 | |
29 | bool fromBuffer(CBufferIn& buffer) ; |
30 | bool toBuffer(CBufferOut& buffer) const; |
31 | void destroy(void) ; |
32 | |
33 | size_t size(void) const; |
34 | CBaseType* duplicate(void) const; |
35 | |
36 | void checkAccess(void) const; |
37 | T* ptrValue ; |
38 | |
39 | bool clone ; |
40 | T value ; |
41 | } ; |
42 | |
43 | class CMessage ; |
44 | |
45 | template <typename T> |
46 | CBufferOut& operator<<(CBufferOut& buffer, const CType<T>& type) ; |
47 | |
48 | |
49 | template <typename T> |
50 | CBufferOut& operator<<(CBufferOut& buffer, T& type) ; |
51 | |
52 | template <typename T> |
53 | CBufferOut& operator<<(CBufferOut& buffer, const T& type) ; |
54 | |
55 | template <typename T> |
56 | CBufferIn& operator>>(CBufferIn& buffer, const CType<T>& type) ; |
57 | |
58 | template <typename T> |
59 | CBufferIn& operator>>(CBufferIn& buffer, T& type) ; |
60 | |
61 | |
62 | |
63 | template <typename T> |
64 | CMessage& operator<<(CMessage& msg, const CType<T>& type) ; |
65 | |
66 | template <typename T> |
67 | CMessage& operator<<(CMessage& msg,CType<T>& type) ; |
68 | |
69 | template <typename T> |
70 | CMessage& operator<<(CMessage& msg, const T& type) ; |
71 | |
72 | template <typename T> |
73 | CMessage& operator<<(CMessage& msg, T& type) ; |
74 | |
75 | } |
76 | |
77 | |
78 | //#include "type_impl.hpp" |
79 | //#include "type_specialisation.hpp" |
80 | |
81 | #endif |
Note: See TracBrowser
for help on using the repository browser.