/usr/include/root/TMessage.h is in libroot-net-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | // @(#)root/net:$Id$
// Author: Fons Rademakers 19/12/96
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TMessage
#define ROOT_TMessage
//////////////////////////////////////////////////////////////////////////
// //
// TMessage //
// //
// Message buffer class used for serializing objects and sending them //
// over the network. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TBufferFile
#include "TBufferFile.h"
#endif
#ifndef ROOT_MessageTypes
#include "MessageTypes.h"
#endif
#ifndef ROOT_TBits
#include "TBits.h"
#endif
class TList;
class TVirtualStreamerInfo;
class TMessage : public TBufferFile {
friend class TAuthenticate;
friend class TSocket;
friend class TUDPSocket;
friend class TPSocket;
friend class TXSocket;
private:
TList *fInfos; //List of TStreamerInfo used in WriteObject
TBits fBitsPIDs; //Array of bits to mark the TProcessIDs uids written to the message
UInt_t fWhat; //Message type
TClass *fClass; //If message is kMESS_OBJECT pointer to object's class
Int_t fCompress; //Compression level and algorithm
char *fBufComp; //Compressed buffer
char *fBufCompCur; //Current position in compressed buffer
char *fCompPos; //Position of fBufCur when message was compressed
Bool_t fEvolution; //True if support for schema evolution required
static Bool_t fgEvolution; //True if global support for schema evolution required
// TMessage objects cannot be copied or assigned
TMessage(const TMessage &); // not implemented
void operator=(const TMessage &); // not implemented
// used by friend TSocket
Bool_t TestBitNumber(UInt_t bitnumber) const { return fBitsPIDs.TestBitNumber(bitnumber); }
protected:
TMessage(void *buf, Int_t bufsize); // only called by T(P)Socket::Recv()
void SetLength() const; // only called by T(P)Socket::Send()
public:
TMessage(UInt_t what = kMESS_ANY, Int_t bufsiz = TBuffer::kInitialSize);
virtual ~TMessage();
void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force);
void Forward();
TClass *GetClass() const { return fClass;}
void TagStreamerInfo(TVirtualStreamerInfo* info);
void Reset();
void Reset(UInt_t what) { SetWhat(what); Reset(); }
UInt_t What() const { return fWhat; }
void SetWhat(UInt_t what);
void EnableSchemaEvolution(Bool_t enable = kTRUE) { fEvolution = enable; }
Bool_t UsesSchemaEvolution() const { return fEvolution; }
TList *GetStreamerInfos() const { return fInfos; }
Int_t GetCompressionAlgorithm() const;
Int_t GetCompressionLevel() const;
Int_t GetCompressionSettings() const;
void SetCompressionAlgorithm(Int_t algorithm=0);
void SetCompressionLevel(Int_t level=1);
void SetCompressionSettings(Int_t settings=1);
Int_t Compress();
Int_t Uncompress();
char *CompBuffer() const { return fBufComp; }
Int_t CompLength() const { return (Int_t)(fBufCompCur - fBufComp); }
void WriteObject(const TObject *obj);
UShort_t WriteProcessID(TProcessID *pid);
static void EnableSchemaEvolutionForAll(Bool_t enable = kTRUE);
static Bool_t UsesSchemaEvolutionForAll();
ClassDef(TMessage,0) // Message buffer class
};
//______________________________________________________________________________
inline Int_t TMessage::GetCompressionAlgorithm() const
{
return (fCompress < 0) ? -1 : fCompress / 100;
}
//______________________________________________________________________________
inline Int_t TMessage::GetCompressionLevel() const
{
return (fCompress < 0) ? -1 : fCompress % 100;
}
//______________________________________________________________________________
inline Int_t TMessage::GetCompressionSettings() const
{
return (fCompress < 0) ? -1 : fCompress;
}
#endif
|