VR-Link API Documentation for HLA Evolved
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
managedInterface
byteStream.h
Go to the documentation of this file.
1
/*********************************************************************************
2
** Copyright (c) 2014 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************************/
5
6
#pragma once
7
13
14
#include "
managedInterface/plugin.h
"
15
16
#include <vector>
17
#include <string>
18
19
22
class
MANAGEDINTERFACE_DLL
DtStreamReader
23
{
24
public
:
26
DtStreamReader
(
unsigned
char
* buffer,
int
length,
bool
copyInternally=
true
);
28
virtual
~
DtStreamReader
();
31
32
bool
readBool();
33
char
readInt8();
34
unsigned
char
readUInt8();
35
short
readInt16();
36
unsigned
short
readUInt16();
37
int
readInt32();
38
unsigned
readUInt32();
39
long
long
readInt64();
40
unsigned
long
long
readUInt64();
41
float
readSingle();
42
double
readDouble();
43
std::string readString();
45
protected
:
47
int
decodeStringSize();
48
unsigned
char
*
myBuffer
;
49
unsigned
char
*
myReadHead
;
50
bool
myBufferAlloced
;
51
};
52
55
class
MANAGEDINTERFACE_DLL
DtStreamWriter
56
{
57
public
:
59
DtStreamWriter
(
int
length=0,
unsigned
char
* buffer=0);
61
virtual
~
DtStreamWriter
();
63
//{@
64
unsigned
char
* buffer();
65
int
length();
67
68
69
70
void
writeBool(
bool
b);
71
void
writeInt8(
char
num);
72
void
writeUInt8(
unsigned
char
num);
73
void
writeInt16(
short
num);
74
void
writeUInt16(
unsigned
short
num);
75
void
writeInt32(
int
num);
76
void
writeUInt32(
unsigned
int
num);
77
void
writeInt64(
long
long
num);
78
void
writeUInt64(
unsigned
long
long
num);
79
void
writeSingle(
float
num);
80
void
writeDouble(
double
num);
81
void
writeString(std::string& str);
83
protected
:
85
void
encodeStringSize(
int
size);
86
unsigned
char
*
myBuffer
;
87
unsigned
char
*
myWriteHead
;
88
int
myLength
;
89
bool
myBufferAlloced
;
90
};
Document ID: Generated on Tue Mar 1 02:56:17 EST 2016 from SVN revision 162687
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)