OpenNet
Buffer.h
1 
2 // Product OpenNet
3 
8 
9 #pragma once
10 
11 // Includes
13 
14 // ===== Includes ===========================================================
15 #include <OpenNet/Status.h>
16 
17 namespace OpenNet
18 {
19 
20  // Class
22 
29  class Buffer
30  {
31 
32  public:
33 
34  // CRITICAL PATH BufferEvent 1- / Buffer event
35 
44  virtual unsigned int GetPacketCount() const = 0;
45 
46  // CRITICAL PATH BufferEvent 1- / Packet event
47 
61  virtual uint32_t GetPacketDestination(unsigned int aIndex) const = 0;
62 
63  // CRITICAL PATH BufferEvent 1 / Packet event
64 
79  virtual unsigned int GetPacketEvent(unsigned int aIndex) const = 0;
80 
81  // CRITICAL PATH BufferEvent
82 
93  virtual unsigned int GetPacketSize(unsigned int aIndex) const = 0;
94 
95  // CRITICAL PATH BufferEvent 1 / Buffer event
96 
104  virtual OpenNet::Status ClearEvent() = 0;
105 
115  virtual OpenNet::Status Display(FILE * aOut) const = 0;
116 
117  // CRITICAL PATH BufferEvent 1- / Packet event
118 
132  virtual OpenNet::Status ReadPacket(unsigned int aIndex, void * aOut, unsigned int aOutSize_byte) = 0;
133 
134  // CRITICAL PATH BufferEvent 1+ / Buffer event
135 
145  virtual OpenNet::Status Wait() = 0;
146 
147  protected:
148 
149  Buffer();
150 
151  private:
152 
153  Buffer(const Buffer &);
154 
155  const Buffer & operator == (const Buffer &);
156 
157  };
158 
159 }
virtual unsigned int GetPacketEvent(unsigned int aIndex) const =0
Trouver le prochain paquet marqué pour le traintement d'un éveacute;nement.
Definition: Adapter.h:19
virtual unsigned int GetPacketCount() const =0
Obtenir le nombre de paquets.
virtual unsigned int GetPacketSize(unsigned int aIndex) const =0
Obtenir la taille du paquet.
virtual OpenNet::Status ClearEvent()=0
Marquer l'événement comme traité.
virtual OpenNet::Status ReadPacket(unsigned int aIndex, void *aOut, unsigned int aOutSize_byte)=0
Lire un paquet.
virtual OpenNet::Status Wait()=0
Attendre que toutes les operation ReadPacket ou ClearEvent soient terminées.
La classe Buffer.
Definition: Buffer.h:29
virtual OpenNet::Status Display(FILE *aOut) const =0
Afficher.
virtual uint32_t GetPacketDestination(unsigned int aIndex) const =0
Obtenir la destination du paquet.