VR-Exchange 2.2 API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
examples
modPortalApp
pFruit.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 2005 VT MAK
3
*********************************************************************/
4
#pragma once
5
8
9
#include <
portal/pObject.h
>
10
#include <vlutil/vlString.h>
11
12
#include <
portal/pReflectedObjectManager.h
>
13
14
// \brief This class represents Fruit objects.
15
class
DtPortalFruit
:
public
MAKVrExchange::DtPortalObject
16
{
17
18
public
:
19
20
// \brief The Default CTOR.
21
DtPortalFruit
();
22
23
// \brief The Default DTOR.
24
virtual
~DtPortalFruit
();
25
26
// \brief The default Copy CTOR.
27
DtPortalFruit
(
const
DtPortalFruit
& other);
28
29
// \brief The default Assignment operator.
30
DtPortalFruit
&
operator=
(
const
DtPortalFruit
& other);
31
32
bool
operator!=
(
const
DtPortalFruit
& other)
const
;
33
bool
operator==
(
const
DtPortalFruit
& other)
const
;
34
35
// \brief returns this message kind.
36
virtual
MAKVrExchange::DtPortalMessageKind
kind
()
const
{
return
DtPortalFruit::theKind
; }
37
38
// \brief Returns string representation of this object kind.
39
virtual
const
char
*
objectKindName
()
const
{
return
"Fruit"
;}
40
41
42
// \brief Returns the number of bytes required to encode this class.
43
virtual
unsigned
int
netSize
()
const
;
44
45
// \brief Encodes class to network structure.
46
virtual
void
writeSelfToBuffer
(
void
*buffer)
const
;
47
48
// \brief Decodes class from network structure.
49
virtual
void
readSelfFromBuffer
(
const
void
*buffer);
50
51
// \brief Prints attributes to a stream.
52
virtual
std::ostream &
printDataToStream
(std::ostream &str)
const
;
53
54
// \brief A string description of the fruit
55
DtDEC_ATTRIBUTE
(
DtString
, FruitType, FruitType);
56
57
// \brief The location of the fruit, in geocentric coordinates.
58
DtDEC_ATTRIBUTE
(DtVector, Location, location);
59
60
// \brief The sugar content as a percentage of the fruits total volume: in the range 0->100
61
DtDEC_ATTRIBUTE
(DtU32, SugarContent, sugarContent);
62
63
public
:
64
65
static
const
MAKVrExchange::DtPortalMessageKind
theKind
;
66
static
DtPortalMessage
*
create
() {
return
new
DtPortalFruit
; }
67
68
};
69
70
// \brief Make a reflected object class.
71
typedef
MAKVrExchange::DtPortalReflectedObjectTemplate<DtPortalFruit>
DtPortalReflectedFruit
;
72
73
// \brief Make a reflected object manager class.
74
typedef
MAKVrExchange::DtPortalReflectedObjectManager<DtPortalReflectedFruit>
DtPortalReflectedFruitManager
;
75
Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)