XrdSutBucket.hh

Go to the documentation of this file.
00001 // $Id: XrdSutBucket.hh 22437 2008-03-04 14:35:16Z rdm $
00002 #ifndef __SUT_BUCKET_H__
00003 #define __SUT_BUCKET_H__
00004 /******************************************************************************/
00005 /*                                                                            */
00006 /*                      X r d S u t B u c k e t . h h                         */
00007 /*                                                                            */
00008 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University  */
00009 /*       All Rights Reserved. See XrdInfo.cc for complete License Terms       */
00010 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00011 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00012 /******************************************************************************/
00013 
00014 #ifndef __SUT_STRING_H__
00015 #include <XrdSut/XrdSutAux.hh>
00016 #endif
00017 
00018 class XrdOucString;
00019 
00020 /******************************************************************************/
00021 /*                                                                            */
00022 /*  Unit for information exchange                                             */
00023 /*                                                                            */
00024 /******************************************************************************/
00025 
00026 class XrdSutBucket
00027 {
00028 public:
00029    kXR_int32   type;
00030    kXR_int32   size;
00031    char       *buffer;
00032 
00033    XrdSutBucket(char *bp=0, int sz=0, int ty=0);
00034    XrdSutBucket(XrdOucString &s, int ty=0);
00035    XrdSutBucket(XrdSutBucket &b);
00036    virtual ~XrdSutBucket() {if (membuf) delete[] membuf;}
00037 
00038    void Update(char *nb = 0, int ns = 0, int ty = 0); // Uses 'nb'
00039    int Update(XrdOucString &s, int ty = 0);
00040    int SetBuf(const char *nb = 0, int ns = 0);         // Duplicates 'nb'
00041 
00042    void Dump(int opt = 1);
00043    void ToString(XrdOucString &s);
00044 
00045    // Equality operator
00046    int operator==(const XrdSutBucket &b);
00047 
00048    // Inequality operator
00049    int operator!=(const XrdSutBucket &b) { return !(*this == b); }
00050 
00051 private:
00052    char *membuf;
00053 };
00054 
00055 #endif
00056 

Generated on Tue Jul 5 14:47:02 2011 for ROOT_528-00b_version by  doxygen 1.5.1