xrootd
XrdSutBucket.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef __SUT_BUCKET_H__
3 #define __SUT_BUCKET_H__
4 /******************************************************************************/
5 /* */
6 /* X r d S u t B u c k e t . h h */
7 /* */
8 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
9 /* All Rights Reserved. See XrdInfo.cc for complete License Terms */
10 /* Produced by Andrew Hanushevsky for Stanford University under contract */
11 /* DE-AC03-76-SFO0515 with the Department of Energy */
12 /******************************************************************************/
13 
14 #ifndef __SUT_STRING_H__
15 #include <XrdSut/XrdSutAux.hh>
16 #endif
17 
18 class XrdOucString;
19 
20 /******************************************************************************/
21 /* */
22 /* Unit for information exchange */
23 /* */
24 /******************************************************************************/
25 
27 {
28 public:
31  char *buffer;
32 
33  XrdSutBucket(char *bp=0, int sz=0, int ty=0);
34  XrdSutBucket(XrdOucString &s, int ty=0);
36  virtual ~XrdSutBucket() {if (membuf) delete[] membuf;}
37 
38  void Update(char *nb = 0, int ns = 0, int ty = 0); // Uses 'nb'
39  int Update(XrdOucString &s, int ty = 0);
40  int SetBuf(const char *nb = 0, int ns = 0); // Duplicates 'nb'
41 
42  void Dump(int opt = 1);
43  void ToString(XrdOucString &s);
44 
45  // Equality operator
46  int operator==(const XrdSutBucket &b);
47 
48  // Inequality operator
49  int operator!=(const XrdSutBucket &b) { return !(*this == b); }
50 
51 private:
52  char *membuf;
53 };
54 
55 #endif
56