VR-Exchange 2.1 API Documentation
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 
13 
14 // \brief This class represents Fruit objects.
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.
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 
66  static DtPortalMessage *create() { return new DtPortalFruit; }
67 
68 };
69 
70 // \brief Make a reflected object class.
72 
73 // \brief Make a reflected object manager class.
75 

Document ID: Generated on Tue Aug 7 22:07:13 EDT 2012 from SVN revision 117874
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)