VR-Forces 4.1.1 Class Documentation
bufferSerialize.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
12 
13 #pragma once
14 
15 #include <vlutil/vlString.h>
16 #include <vlutil/vlMachineTypes.h>
17 #include <matrix/vlVector.h>
18 #include <matrix/vlTaitBryan.h>
19 #include <vlutil/vlFilename.h>
20 #include <vrfExtProtocol/objType.h>
21 #include <vector>
22 #include <set>
23 #include <list>
24 #include <string>
25 #include "vrfutil/vrfutilDefines.h"
26 #include "vrfutil/rwBoolean.h"
27 #include "vrfutil/rwInt.h"
28 #include "vrfutil/rwObjType.h"
29 #include "vrfutil/rwStringList.h"
31 #include "vrfutil/rwForce.h"
32 #include "vrfutil/rwFormType.h"
33 #include "vrfutil/rwReal.h"
34 #include "vrfutil/rwUnsigned.h"
36 
37 #include <vlpi/entityIdentifier.h>
38 #include <vlpi/appearance.h>
39 #include <vlutil/vlInetAddr.h>
40 
42 
48 namespace DtBufferSerialize
49 {
57 
58  DT_DLL_vrfutil char *encode(const DtFilename& val, char *buffer);
59  DT_DLL_vrfutil char *encode(const DtString& val, char *buffer);
60  DT_DLL_vrfutil char *encode(const std::string& val, char *buffer);
61  DT_DLL_vrfutil char *encode(const char *val, unsigned nSize, char *buffer);
62  DT_DLL_vrfutil char *encode(const int& val, char *buffer);
63  DT_DLL_vrfutil char *encode(const DtInt16& val, char *buffer);
64  DT_DLL_vrfutil char *encode(const DtU8& val, char *buffer);
65  DT_DLL_vrfutil char *encode(const DtU16& val, char *buffer);
66  DT_DLL_vrfutil char *encode(const DtU32& val, char *buffer);
67  DT_DLL_vrfutil char *encode(const DtU64& val, char *buffer);
68  DT_DLL_vrfutil char *encode(const DtFloat32& val, char *buffer);
69  DT_DLL_vrfutil char *encode(const DtFloat64& val, char *buffer);
70  DT_DLL_vrfutil char *encode(const DtVector& val, char *buffer);
71  DT_DLL_vrfutil char *encode(const DtTaitBryan& val, char *buffer);
72  DT_DLL_vrfutil char *encode(const bool& val, char *buffer);
73  DT_DLL_vrfutil char *encode(const DtObjectType& val, char *buffer);
74  DT_DLL_vrfutil char *encode(const std::vector<char>& val, char *buffer);
75  DT_DLL_vrfutil char *encode(const DtRwBoolean& val, char *buffer);
76  DT_DLL_vrfutil char *encode(const DtEntityType& val, char *buffer);
77  DT_DLL_vrfutil char *encode(const DtEntityIdentifier& val, char *buffer);
78  DT_DLL_vrfutil char *encode(const DtSimulationAddress& val, char *buffer);
79  DT_DLL_vrfutil char *encode(const DtAppearance& val, char *buffer);
80  DT_DLL_vrfutil char *encode(const DtForceType& val, char *buffer);
81  DT_DLL_vrfutil char *encode(const DtInetAddr& val, char *buffer);
82  DT_DLL_vrfutil char *encode(const DtRwInt& val, char* buffer);
83  DT_DLL_vrfutil char *encode(const DtRwVariableBindings& val, char* buffer);
84  DT_DLL_vrfutil char *encode(const DtRwObjectType& val, char* buffer);
85  DT_DLL_vrfutil char *encode(const DtRwStringList& val, char* buffer);
86  DT_DLL_vrfutil char *encode(const DtRwNLengthStringVector& val, char* buffer);
87  template <typename T>
88  char* encode(const std::vector<T>& val, char* buffer);
89  template <typename T>
90  char* encode(const std::set<T>& val, char* buffer);
91  template <typename T>
92  char* encode(const std::list<T>& val, char* buffer);
93  template <typename T1, typename T2>
94  char* encode(const std::map<T1, T2>& val, char* buffer);
95  template <typename T1, typename T2>
96  char* encode(const std::pair<T1, T2>& val, char* buffer);
97 
98  //specialized version of decode for std::vector<bool> due to problems with c++
99  //standard on how vector<bool> is defined
100  DT_DLL_vrfutil char *encode(const std::vector<bool>& val, char *buffer);
102 
103 
111 
112  DT_DLL_vrfutil const char *decode(DtString& val, const char *buffer) ;
113  DT_DLL_vrfutil const char *decode(std::string& val, const char *buffer) ;
114  DT_DLL_vrfutil const char *decode(DtFilename& val, const char *buffer) ;
115  DT_DLL_vrfutil const char *decode(int& val, const char *buffer) ;
116  DT_DLL_vrfutil const char *decode(DtU8& val, const char *buffer) ;
117  DT_DLL_vrfutil const char *decode(DtU16& val, const char *buffer) ;
118  DT_DLL_vrfutil const char *decode(DtU32& val, const char *buffer) ;
119  DT_DLL_vrfutil const char *decode(DtU64& val, const char *buffer) ;
120  DT_DLL_vrfutil const char *decode(DtFloat32& val, const char *buffer) ;
121  DT_DLL_vrfutil const char *decode(DtFloat64& val, const char *buffer) ;
122  DT_DLL_vrfutil const char *decode(DtVector& val, const char *buffer) ;
123  DT_DLL_vrfutil const char *decode(DtTaitBryan& val, const char *buffer) ;
124  DT_DLL_vrfutil const char *decode(bool &val, const char *buffer) ;
125  DT_DLL_vrfutil const char *decode(DtObjectType &val, const char *buffer) ;
126  DT_DLL_vrfutil const char *decode(std::vector<char>& val, const char *buffer) ;
127  DT_DLL_vrfutil const char *decode(DtRwBoolean &val, const char *buffer) ;
128  DT_DLL_vrfutil const char *decode(DtEntityType& val, const char *buffer);
129  DT_DLL_vrfutil const char *decode(DtEntityIdentifier& val, const char *buffer);
130  DT_DLL_vrfutil const char *decode(DtSimulationAddress& val, const char *buffer);
131  DT_DLL_vrfutil const char *decode(DtAppearance& val, const char *buffer);
132  DT_DLL_vrfutil const char *decode(DtForceType& val, const char *buffer);
133  DT_DLL_vrfutil const char *decode(DtInetAddr& val, const char *buffer);
134  DT_DLL_vrfutil const char *decode(DtRwInt& val, const char *buffer);
135  DT_DLL_vrfutil const char *decode(DtRwObjectType& val, const char *buffer);
136  DT_DLL_vrfutil const char *decode(DtRwStringList& val, const char *buffer);
137  DT_DLL_vrfutil const char *decode(DtRwNLengthStringVector& val, const char *buffer);
138  DT_DLL_vrfutil const char *decode(DtRwVariableBindings& val, const char *buffer);
139  template <typename T>
140  const char *decode(std::vector<T>& val, const char *buffer);
141  template <typename T>
142  const char *decode(std::set<T>& val, const char *buffer);
143  template <typename T>
144  const char *decode(std::list<T>& val, const char *buffer);
145  template <typename T1, typename T2>
146  const char *decode(std::map<T1, T2>& val, const char *buffer);
147  template <typename T1, typename T2>
148  const char *decode(std::pair<T1, T2>& val, const char *buffer);
149 
150  //specialized version of decode for std::vector<bool> due to problems with c++
151  //standard on how vector<bool> is defined
152  DT_DLL_vrfutil const char *decode(std::vector<bool>& val, const char *buffer);
154 
158 
159  DT_DLL_vrfutil int getSize(const DtString& val) ;
160  DT_DLL_vrfutil int getSize(const std::string& val);
161  DT_DLL_vrfutil int getSize(const DtFilename& val) ;
162  DT_DLL_vrfutil int getSize(const DtVector& v) ;
163  DT_DLL_vrfutil int getSize(const int& v) ;
164  DT_DLL_vrfutil int getSize(const DtU8& v) ;
165  DT_DLL_vrfutil int getSize(const DtU16& v) ;
166  DT_DLL_vrfutil int getSize(const DtU32& v) ;
167  DT_DLL_vrfutil int getSize(const DtU64& v) ;
168  DT_DLL_vrfutil int getSize(const DtFloat32& v) ;
169  DT_DLL_vrfutil int getSize(const DtFloat64& v) ;
170  DT_DLL_vrfutil int getSize(const bool&v) ;
171  DT_DLL_vrfutil int getSize(const DtObjectType& v) ;
172  DT_DLL_vrfutil int getSize(const DtTaitBryan& v) ;
173  DT_DLL_vrfutil int getSize(const std::vector<char>& v) ;
174  DT_DLL_vrfutil int getSize(const DtRwBoolean& v) ;
175  DT_DLL_vrfutil int getSize(const DtEntityType& v);
176  DT_DLL_vrfutil int getSize(const DtEntityIdentifier& v);
177  DT_DLL_vrfutil int getSize(const DtSimulationAddress& v);
178  DT_DLL_vrfutil int getSize(const DtAppearance& v);
179  DT_DLL_vrfutil int getSize(const DtForceType& v);
180  DT_DLL_vrfutil int getSize(const DtInetAddr& v);
181  DT_DLL_vrfutil int getSize(const DtRwInt& v);
182  DT_DLL_vrfutil int getSize(const DtRwObjectType& v);
184  DT_DLL_vrfutil int getSize(const DtRwStringList& v);
186  template <typename T>
187  int getSize(const std::vector<T>& v) ;
188  template <typename T>
189  int getSize(const std::list<T>& v) ;
190  template <typename T1, typename T2>
191  int getSize(const std::map<T1, T2>& v) ;
192  template <typename T1, typename T2>
193  int getSize(const std::pair<T1, T2>& v) ;
194  template <typename T>
195  int getSize(const std::set<T>& v) ;
196 
197  //specialized version of decode for std::vector<bool> due to problems with c++
198  //standard on how vector<bool> is defined
199  DT_DLL_vrfutil int getSize(const std::vector<bool>& v);
201 
204  DT_DLL_vrfutil int getSize(const DtSimInterfaceContent* const& contentPtr);
205 
210  DT_DLL_vrfutil char *encode(const DtSimInterfaceContent* const& adminContentPtr, char *buffer);
211 
220  DT_DLL_vrfutil const char *decode(DtSimInterfaceContent*& interfaceContentPtr, const char *buffer);
221 }
222 
223 #define bufferSerialize_INL_
224 #include "vrfutil/bufferSerialize.inl"
225 #undef bufferSerialize_INL_
226 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)