# cmemcommbuffer.h

    00001 //=========================================================================
    00002 //  CMEMCOMMBUFFER.H - part of
    00003 //
    00004 //                  OMNeT++/OMNEST
    00005 //           Discrete System Simulation in C++
    00006 //
    00007 //   Written by:  Andras Varga, 2003
    00008 //
    00009 //=========================================================================
    00010
    00011 /*--------------------------------------------------------------*
    00012   Copyright (C) 2003-2005 Andras Varga
    00013   Monash University, Dept. of Electrical and Computer Systems Eng.
    00014   Melbourne, Australia
    00015
    00016   This file is distributed WITHOUT ANY WARRANTY. See the file
    00017   `license' for details on this and other legal matters.
    00018 *--------------------------------------------------------------*/
    00019
    00020 #ifndef __CMEMCOMMBUFFER_H__
    00021 #define __CMEMCOMMBUFFER_H__
    00022
    00023 #include "ccommbufferbase.h"
    00024
    00025
    00032 class cMemCommBuffer : public cCommBufferBase
    00033 {
    00034   public:
    00038     cMemCommBuffer();
    00039
    00043     virtual ~cMemCommBuffer();
    00044
    00047     virtual void pack(char d);
    00048     virtual void pack(unsigned char d);
    00049     virtual void pack(bool d);
    00050     virtual void pack(short d);
    00051     virtual void pack(unsigned short d);
    00052     virtual void pack(int d);
    00053     virtual void pack(unsigned int d);
    00054     virtual void pack(long d);
    00055     virtual void pack(unsigned long d);
    00056     virtual void pack(float d);
    00057     virtual void pack(double d);
    00058     virtual void pack(long double d);
    00059     virtual void pack(const char *d);
    00060     virtual void pack(opp_string& d);
    00062
    00065     virtual void pack(const char *d, int size);
    00066     virtual void pack(unsigned char *d, int size);
    00067     virtual void pack(bool *d, int size);
    00068     virtual void pack(short *d, int size);
    00069     virtual void pack(unsigned short *d, int size);
    00070     virtual void pack(int *d, int size);
    00071     virtual void pack(unsigned int *d, int size);
    00072     virtual void pack(long *d, int size);
    00073     virtual void pack(unsigned long *d, int size);
    00074     virtual void pack(float *d, int size);
    00075     virtual void pack(double *d, int size);
    00076     virtual void pack(long double *d, int size);
    00077     virtual void pack(const char **d, int size);
    00078     virtual void pack(opp_string *d, int size);
    00080
    00083     virtual void unpack(char& d);
    00084     virtual void unpack(unsigned char& d);
    00085     virtual void unpack(bool& d);
    00086     virtual void unpack(short& d);
    00087     virtual void unpack(unsigned short& d);
    00088     virtual void unpack(int& d);
    00089     virtual void unpack(unsigned int& d);
    00090     virtual void unpack(long& d);
    00091     virtual void unpack(unsigned long& d);
    00092     virtual void unpack(float& d);
    00093     virtual void unpack(double& d);
    00094     virtual void unpack(long double& d);
    00095     virtual void unpack(const char *&d);
    00096     virtual void unpack(opp_string& d);
    00098
    00101     virtual void unpack(char *d, int size);
    00102     virtual void unpack(unsigned char *d, int size);
    00103     virtual void unpack(bool *d, int size);
    00104     virtual void unpack(short *d, int size);
    00105     virtual void unpack(unsigned short *d, int size);
    00106     virtual void unpack(int *d, int size);
    00107     virtual void unpack(unsigned int *d, int size);
    00108     virtual void unpack(long *d, int size);
    00109     virtual void unpack(unsigned long *d, int size);
    00110     virtual void unpack(float *d, int size);
    00111     virtual void unpack(double *d, int size);
    00112     virtual void unpack(long double *d, int size);
    00113     virtual void unpack(const char **d, int size);
    00114     virtual void unpack(opp_string *d, int size);
    00116 };
    00117
    00118 #endif
    00119