OMNeT++ Parallel Simulation Support 6.1
Discrete Event Simulation Library
cfilecommbuffer.h
1 //=========================================================================
2 // CFILECOMMBUFFER.H - part of
3 //
4 // OMNeT++/OMNEST
5 // Discrete System Simulation in C++
6 //
7 //=========================================================================
8 
9 /*--------------------------------------------------------------*
10  Copyright (C) 1992-2017 Andras Varga
11  Copyright (C) 2006-2017 OpenSim Ltd.
12 
13  This file is distributed WITHOUT ANY WARRANTY. See the file
14  `license' for details on this and other legal matters.
15 *--------------------------------------------------------------*/
16 
17 #ifndef __OMNETPP_CFILECOMMBUFFER_H
18 #define __OMNETPP_CFILECOMMBUFFER_H
19 
20 #include "ccommbufferbase.h"
21 #include "omnetpp/opp_string.h"
22 
23 namespace omnetpp {
24 
25 
32 class SIM_API cFileCommBuffer : public cCommBufferBase
33 {
34  public:
39 
43  virtual ~cFileCommBuffer() {}
44 
48  void setMessageSize(int size);
49 
52  virtual void pack(char d) override;
53  virtual void pack(unsigned char d) override;
54  virtual void pack(bool d) override;
55  virtual void pack(short d) override;
56  virtual void pack(unsigned short d) override;
57  virtual void pack(int d) override;
58  virtual void pack(unsigned int d) override;
59  virtual void pack(long d) override;
60  virtual void pack(unsigned long d) override;
61  virtual void pack(long long d) override;
62  virtual void pack(unsigned long long d) override;
63  virtual void pack(float d) override;
64  virtual void pack(double d) override;
65  virtual void pack(long double d) override;
66  virtual void pack(const char *d) override;
67  virtual void pack(const opp_string& d) override;
68  virtual void pack(SimTime d) override;
70 
73  virtual void pack(const char *d, int size) override;
74  virtual void pack(const unsigned char *d, int size) override;
75  virtual void pack(const bool *d, int size) override;
76  virtual void pack(const short *d, int size) override;
77  virtual void pack(const unsigned short *d, int size) override;
78  virtual void pack(const int *d, int size) override;
79  virtual void pack(const unsigned int *d, int size) override;
80  virtual void pack(const long *d, int size) override;
81  virtual void pack(const unsigned long *d, int size) override;
82  virtual void pack(const long long *d, int size) override;
83  virtual void pack(const unsigned long long *d, int size) override;
84  virtual void pack(const float *d, int size) override;
85  virtual void pack(const double *d, int size) override;
86  virtual void pack(const long double *d, int size) override;
87  virtual void pack(const char **d, int size) override;
88  virtual void pack(const opp_string *d, int size) override;
89  virtual void pack(const SimTime *d, int size) override;
91 
94  virtual void unpack(char& d) override;
95  virtual void unpack(unsigned char& d) override;
96  virtual void unpack(bool& d) override;
97  virtual void unpack(short& d) override;
98  virtual void unpack(unsigned short& d) override;
99  virtual void unpack(int& d) override;
100  virtual void unpack(unsigned int& d) override;
101  virtual void unpack(long& d) override;
102  virtual void unpack(unsigned long& d) override;
103  virtual void unpack(long long& d) override;
104  virtual void unpack(unsigned long long& d) override;
105  virtual void unpack(float& d) override;
106  virtual void unpack(double& d) override;
107  virtual void unpack(long double& d) override;
108  virtual void unpack(const char *&d) override;
109  virtual void unpack(opp_string& d) override;
110  virtual void unpack(SimTime& d) override;
112 
115  virtual void unpack(char *d, int size) override;
116  virtual void unpack(unsigned char *d, int size) override;
117  virtual void unpack(bool *d, int size) override;
118  virtual void unpack(short *d, int size) override;
119  virtual void unpack(unsigned short *d, int size) override;
120  virtual void unpack(int *d, int size) override;
121  virtual void unpack(unsigned int *d, int size) override;
122  virtual void unpack(long *d, int size) override;
123  virtual void unpack(unsigned long *d, int size) override;
124  virtual void unpack(long long *d, int size) override;
125  virtual void unpack(unsigned long long *d, int size) override;
126  virtual void unpack(float *d, int size) override;
127  virtual void unpack(double *d, int size) override;
128  virtual void unpack(long double *d, int size) override;
129  virtual void unpack(const char **d, int size) override;
130  virtual void unpack(opp_string *d, int size) override;
131  virtual void unpack(SimTime *d, int size) override;
133 };
134 
135 } // namespace omnetpp
136 
137 
138 #endif
139 
omnetpp::cCommBufferBase
Adds buffer (re)allocation functions to cCommBuffer. This functionality is not always needed,...
Definition: ccommbufferbase.h:28
omnetpp::cFileCommBuffer::~cFileCommBuffer
virtual ~cFileCommBuffer()
Definition: cfilecommbuffer.h:43
omnetpp::cFileCommBuffer
Communication buffer that packs data in a text representation into a memory buffer.
Definition: cfilecommbuffer.h:32
omnetpp::cFileCommBuffer::cFileCommBuffer
cFileCommBuffer()
Definition: cfilecommbuffer.h:38