XRootD
XrdOfsEvsFormat Class Reference

#include <XrdOfsEvs.hh>

+ Collaboration diagram for XrdOfsEvsFormat:

Public Types

enum  evFlags {
  Null = 0 ,
  freeFmt = 1 ,
  cvtMode = 2 ,
  cvtFSize = 4
}
 

Public Member Functions

 XrdOfsEvsFormat ()
 
 ~XrdOfsEvsFormat ()
 
void Def (evFlags theFlags, const char *Fmt,...)
 
void Set (evFlags theFlags, const char *Fmt, int *fullArgs)
 
int SNP (XrdOfsEvsInfo &Info, char *buff, int blen)
 

Public Attributes

XrdOfsEvsInfo::evArg Args [XrdOfsEvsInfo::evARGS]
 
evFlags Flags
 
const char * Format
 

Detailed Description

Definition at line 87 of file XrdOfsEvs.hh.

Member Enumeration Documentation

◆ evFlags

Enumerator
Null 
freeFmt 
cvtMode 
cvtFSize 

Definition at line 91 of file XrdOfsEvs.hh.

Constructor & Destructor Documentation

◆ XrdOfsEvsFormat()

XrdOfsEvsFormat::XrdOfsEvsFormat ( )
inline

Definition at line 112 of file XrdOfsEvs.hh.

112 : Format(0), Flags(Null) {}
const char * Format
Definition: XrdOfsEvs.hh:93
evFlags Flags
Definition: XrdOfsEvs.hh:94

◆ ~XrdOfsEvsFormat()

XrdOfsEvsFormat::~XrdOfsEvsFormat ( )
inline

Definition at line 113 of file XrdOfsEvs.hh.

113 {}

Member Function Documentation

◆ Def()

void XrdOfsEvsFormat::Def ( evFlags  theFlags,
const char *  Fmt,
  ... 
)

Definition at line 91 of file XrdOfsEvs.cc.

92 {
93  va_list ap;
94  int theVal, i = 0;
95 
96 // Return if already defined
97 //
98  if (Format) return;
99 
100 // Set flags and format. Prepare the arg vector
101 //
102  Flags = theFlags;
103  Format = Fmt;
104  memset(Args, 0, sizeof(Args));
105 
106 // Pick up all arguments
107 //
108  va_start(ap, Fmt);
109  while((theVal = va_arg(ap, int)) >= 0)
110  Args[i++] = static_cast<XrdOfsEvsInfo::evArg>(theVal);
111  va_end(ap);
112 }
XrdOfsEvsInfo::evArg Args[XrdOfsEvsInfo::evARGS]
Definition: XrdOfsEvs.hh:95

References Args, Flags, and Format.

Referenced by XrdOfsEvs::XrdOfsEvs().

+ Here is the caller graph for this function:

◆ Set()

void XrdOfsEvsFormat::Set ( evFlags  theFlags,
const char *  Fmt,
int *  fullArgs 
)
inline

Definition at line 106 of file XrdOfsEvs.hh.

107  {if (Format && Flags & freeFmt) free((char *)Format);
108  Format = Fmt; Flags = theFlags;
109  memcpy(Args, fullArgs, sizeof(Args));
110  }

References Args, Flags, Format, and freeFmt.

Referenced by XrdOfsEvs::Parse().

+ Here is the caller graph for this function:

◆ SNP()

int XrdOfsEvsFormat::SNP ( XrdOfsEvsInfo Info,
char *  buff,
int  blen 
)
inline

Definition at line 97 of file XrdOfsEvs.hh.

98  {return snprintf(buff,blen,Format, Info.Val(Args[0]),
99  Info.Val(Args[1]), Info.Val(Args[2]),
100  Info.Val(Args[3]), Info.Val(Args[4]),
101  Info.Val(Args[5]), Info.Val(Args[6]));
102  }
@ Info

References Args, Format, and Info.

Referenced by XrdOfsEvs::Notify().

+ Here is the caller graph for this function:

Member Data Documentation

◆ Args

Definition at line 95 of file XrdOfsEvs.hh.

Referenced by Def(), Set(), and SNP().

◆ Flags

evFlags XrdOfsEvsFormat::Flags

Definition at line 94 of file XrdOfsEvs.hh.

Referenced by Def(), XrdOfsEvs::Notify(), and Set().

◆ Format

const char* XrdOfsEvsFormat::Format

Definition at line 93 of file XrdOfsEvs.hh.

Referenced by Def(), Set(), and SNP().


The documentation for this class was generated from the following files: