15 #ifndef vtkClientServerStream_h 16 #define vtkClientServerStream_h 21 class vtkClientServerStreamInternals;
99 void Reserve(
size_t size);
118 int GetNumberOfMessages()
const;
130 int GetNumberOfArguments(
int message)
const;
144 int GetArgument(
int message,
int argument,
bool* value)
const;
145 int GetArgument(
int message,
int argument,
signed char* value)
const;
146 int GetArgument(
int message,
int argument,
char* value)
const;
147 int GetArgument(
int message,
int argument,
short* value)
const;
148 int GetArgument(
int message,
int argument,
int* value)
const;
149 int GetArgument(
int message,
int argument,
long* value)
const;
150 int GetArgument(
int message,
int argument,
unsigned char* value)
const;
151 int GetArgument(
int message,
int argument,
unsigned short* value)
const;
152 int GetArgument(
int message,
int argument,
unsigned int* value)
const;
153 int GetArgument(
int message,
int argument,
unsigned long* value)
const;
154 int GetArgument(
int message,
int argument,
float* value)
const;
155 int GetArgument(
int message,
int argument,
double* value)
const;
156 int GetArgument(
int message,
int argument,
long long* value)
const;
157 int GetArgument(
int message,
int argument,
unsigned long long* value)
const;
158 int GetArgument(
int message,
int argument,
signed char* value, vtkTypeUInt32 length)
const;
159 int GetArgument(
int message,
int argument,
char* value, vtkTypeUInt32 length)
const;
160 int GetArgument(
int message,
int argument,
short* value, vtkTypeUInt32 length)
const;
161 int GetArgument(
int message,
int argument,
int* value, vtkTypeUInt32 length)
const;
162 int GetArgument(
int message,
int argument,
long* value, vtkTypeUInt32 length)
const;
163 int GetArgument(
int message,
int argument,
unsigned char* value, vtkTypeUInt32 length)
const;
164 int GetArgument(
int message,
int argument,
unsigned short* value, vtkTypeUInt32 length)
const;
165 int GetArgument(
int message,
int argument,
unsigned int* value, vtkTypeUInt32 length)
const;
166 int GetArgument(
int message,
int argument,
unsigned long* value, vtkTypeUInt32 length)
const;
167 int GetArgument(
int message,
int argument,
float* value, vtkTypeUInt32 length)
const;
168 int GetArgument(
int message,
int argument,
double* value, vtkTypeUInt32 length)
const;
169 int GetArgument(
int message,
int argument,
long long* value, vtkTypeUInt32 length)
const;
170 int GetArgument(
int message,
int argument,
unsigned long long* value, vtkTypeUInt32 length)
const;
171 int GetArgument(
int message,
int argument,
const char** value)
const;
172 int GetArgument(
int message,
int argument,
char** value)
const;
173 int GetArgument(
int message,
int argument,
vtkStdString* value)
const;
174 int GetArgument(
int message,
int argument, std::string* value)
const;
177 int GetArgument(
int message,
int argument,
vtkObjectBase** value)
const;
189 int GetArgument(
int message,
int& argument,
vtkVariant* value)
const;
195 int GetArgumentLength(
int message,
int argument, vtkTypeUInt32* length)
const;
202 int GetArgumentObject(
int message,
int argument,
vtkObjectBase** value,
const char* type)
const;
229 int GetData(
const unsigned char** data,
size_t* length)
const;
308 int SetData(
const unsigned char* data,
size_t length);
348 void Print(ostream&)
const;
350 void PrintMessage(ostream&,
int message)
const;
351 void PrintMessage(ostream&,
int message,
vtkIndent)
const;
352 void PrintArgument(ostream&,
int message,
int argument)
const;
353 void PrintArgument(ostream&,
int message,
int argument,
vtkIndent)
const;
354 void PrintArgumentValue(ostream&,
int message,
int argument)
const;
361 const char* StreamToString()
const;
362 void StreamToString(ostream& os)
const;
370 int StreamFromString(
const char* str);
378 unsigned char* ParseCommand(
379 int order,
unsigned char* data,
unsigned char* begin,
unsigned char* end);
381 unsigned char* ParseType(
int order,
unsigned char* data,
unsigned char* begin,
unsigned char* end,
383 unsigned char* ParseValue(
384 int order,
unsigned char* data,
unsigned char* end,
unsigned int wordSize);
385 unsigned char* ParseArray(
386 int order,
unsigned char* data,
unsigned char* end,
unsigned int wordSize);
387 unsigned char* ParseString(
int order,
unsigned char* data,
unsigned char* end);
388 unsigned char* ParseStream(
int order,
unsigned char* data,
unsigned char* end);
399 void PerformByteSwap(
400 int dataByteOrder,
unsigned char* data,
unsigned int numWords,
unsigned int wordSize);
404 const unsigned char*
GetValue(
int message,
int value)
const;
409 int GetNumberOfValues(
int message)
const;
413 void PrintArgumentInternal(ostream&,
int message,
int argument,
int annotate,
vtkIndent)
const;
416 void StreamToString(ostream& os,
vtkIndent indent)
const;
417 void MessageToString(ostream& os,
int m)
const;
418 void MessageToString(ostream& os,
int m,
vtkIndent indent)
const;
419 void ArgumentToString(ostream& os,
int m,
int a)
const;
420 void ArgumentToString(ostream& os,
int m,
int a,
vtkIndent indent)
const;
421 void ArgumentValueToString(ostream& os,
int m,
int a,
vtkIndent indent)
const;
430 int StreamFromStringInternal(
const char* begin,
const char* end);
431 int AddMessageFromString(
const char* begin,
const char* end,
const char** next);
432 int AddArgumentFromString(
const char* begin,
const char* end,
const char** next);
435 vtkClientServerStreamInternals* Internal;
436 friend class vtkClientServerStreamInternals;
452 *result =
reinterpret_cast<T*
>(obj);
459 #if defined(VTK_WRAPPING_CXX) 463 class vtkClientServerStreamDataArg
478 this->Data =
new T[length];
486 if (this->Data && !msg.
GetArgument(message, argument, this->Data, length))
489 this->Data =
nullptr;
494 ~vtkClientServerStreamDataArg() {
delete[] this->Data; }
497 operator T*() {
return this->Data; }
Proxy-object returned by InsertArray and used to insert array data into the stream.
int GetArgument(int message, int argument, bool *value) const
Get the value of the given argument in the given message.
Types
Enumeration of data types that may be stored in a stream.
const unsigned char * Data
Proxy-object returned by the two-argument form of GetArgument.
int GetArgumentObject(int message, int argument, vtkObjectBase **value, const char *type) const
Get the given argument in the given message as an object of a particular vtkObjectBase type...
T * operator<<(T *LHS, const pqConnect &RHS)
Makes a Qt connection.
Store messages for the interpreter.
ValueType GetValue(vtkIdType valueIdx) const
int GetArgumentLength(int message, int argument, vtkTypeUInt32 *length) const
Get the length of an argument of an array type.
Commands
Enumeration of message types that may be stored in a stream.
#define VTKREMOTINGCLIENTSERVERSTREAM_EXPORT
Identifier for a ClientServer object.
int vtkClientServerStreamGetArgumentObject(const vtkClientServerStream &msg, int message, int argument, T **result, const char *type)
Get the given argument of the given message as a pointer to a vtkObjectBase instance of a specific ty...