VR-Exchange 2.1 API Documentation
pSupplyInteraction.h
Go to the documentation of this file.
1 /******************************************************************************
2  ** Copyright (c) 1992-2010 VT MAK
3 ******************************************************************************/
4 
5 #pragma once
6 
10 
11 
12 #include <portal/pBaseInteraction.h> //class DtPortalBaseInteraction
14 
15 namespace MAKVrExchange {
16 
17 class DtPortalConnection;
18 
19 
23 
25 {
26 public:
27 
30 
32  virtual ~DtPortalSupplyInteraction();
33 
36 
40 
41 
44 
45  DtDEC_ATTRIBUTE( DtString, ReceivingId, receivingId );
46  DtDEC_ATTRIBUTE( DtString, SupplyingId, supplyingId );
47 
48 public:
49 
50 
52  DtU32 numSupplyTypes() const;
53  void setNumSupplyTypes(DtU32 num);
54 
55  float supplyQuantity(const DtEntityType& supply);
56 
58  int nthSupply(unsigned int supplyIndex,
59  DtNetEntityType& requestedSupply, float* quantity = 0) const;
60  int setNthSupply(unsigned int supplyIndex, const DtEntityType& supply,
61  float* const quantity = 0);
62 
64 
66 public:
67 
68  //Doxygen comments inherited from parent class
69  virtual DtPortalMessageKind kind() const = 0;
70 
71  //Doxygen comments inherited from parent class
72  virtual const char *interactionKindName() const = 0;
73 
74  //Doxygen comments inherited from parent class
75  virtual unsigned int netSize() const;
76 
77  //Doxygen comments inherited from parent class
78  virtual void writeSelfToBuffer( void *buffer ) const;
79 
80  //Doxygen comments inherited from parent class
81  virtual void readSelfFromBuffer( const void *buffer );
82 
83 
84  //Doxygen comments inherited from parent class
85  virtual std::ostream &printDataToStream( std::ostream &str ) const;
86 
87 protected:
88 
91  DtNetEntityType myInvalidIndexSupplyValue;
92 
93 
94 private:
95 
98 
100  int operator==( const DtPortalSupplyInteraction & );
101 
103  int operator!=( const DtPortalSupplyInteraction & );
104 
105 }; //end class DtPortalSupplyInteraction
106 
107 
108 
109 }
110 

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)