VR-Exchange 2.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pSupplyInteraction.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pInteraction.h>
14 
15 namespace MAKVrExchange
16 {
17 
18  class DtPortalConnection;
19 
23  : public DtPortalInteraction
24  {
25  public:
26 
29 
32 
34  virtual ~DtPortalSupplyInteraction();
35 
37  DtPortalSupplyInteraction& operator = ( const DtPortalSupplyInteraction& other );
38 
41 
42  DtDEC_ATTRIBUTE( DtString, ReceivingId, receivingId );
43  DtDEC_ATTRIBUTE( DtString, SupplyingId, supplyingId );
44 
46  public:
47 
48  DtU32 numSupplyTypes() const;
49  void setNumSupplyTypes( DtU32 num );
50 
51  float supplyQuantity( const DtEntityType& supply );
52 
54  int setNthSupply( unsigned int supplyIndex, const DtEntityType& supply,
55  float* const quantity = 0 );
56  int nthSupply( unsigned int supplyIndex, DtNetEntityType& requestedSupply,
57  float* quantity = 0 ) const;
58 
60 
61  public:
62 
63  virtual unsigned int netSize() const;
64  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
65  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
66 
67  virtual std::ostream& printDataToStream( std::ostream& str ) const;
68 
69  protected:
70 
72  DtNetEntityType myInvalidIndexSupplyValue;
74 
75  };
76 
77 }
DtU32 myNumSupplyTypes
Definition: pSupplyInteraction.h:71
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
#define DtDEC_ATTRIBUTE(T, N, n)
A Macro to define an attribute; as well as make an accessor and mutator for that attribute.
Definition: addAttribute.h:49
Contains the DtPortalInteraction class declaration.
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
DtNetEntityType myInvalidIndexSupplyValue
Definition: pSupplyInteraction.h:72
Portal Supply Interaction class.
Definition: pSupplyInteraction.h:22
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23
Instances of DtVrxNetSupplyQuantity are exactly the same as DtNetSupplyQuantity instances.
Definition: vrxRecordSetList.h:27
DtVrxNetSupplyQuantity * mySupplys
Definition: pSupplyInteraction.h:73

Document ID: Generated on Tue Aug 16 16:15:26 EDT 2022 from SVN revision 245901
Copyright © 2005-2022 MAK Technologies. All Rights Reserved (www.mak.com)