Public Types | Public Member Functions | Static Public Member Functions | Data Fields

LogField Class Reference

#include <LogField.h>

Collaboration diagram for LogField:
Collaboration graph
[legend]

Public Types

enum  Type {
  sINT = 0, dINT, STRING, IP,
  N_TYPES
}
enum  Container {
  NO_CONTAINER = 0, CQH, PSH, PQH,
  SSH, CSSH, ECQH, EPSH,
  EPQH, ESSH, ECSSH, ICFG,
  SCFG, RECORD, N_CONTAINERS
}
enum  Aggregate {
  NO_AGGREGATE = 0, eCOUNT, eSUM, eAVG,
  eFIRST, eLAST, N_AGGREGATES
}
typedef int(LogAccess::* MarshalFunc )(char *buf)
typedef int(* UnmarshalFunc )(char **buf, char *dest, int len)
typedef int(* UnmarshalFuncWithSlice )(char **buf, char *dest, int len, LogSlice *slice)
typedef int(* UnmarshalFuncWithMap )(char **buf, char *dest, int len, Ptr< LogFieldAliasMap > map)
typedef void(LogAccess::* SetFunc )(char *buf, int len)

Public Member Functions

 LogField (const char *name, const char *symbol, Type type, MarshalFunc marshal, UnmarshalFunc unmarshal, SetFunc _setFunc=NULL)
 LogField (const char *name, const char *symbol, Type type, MarshalFunc marshal, UnmarshalFuncWithMap unmarshal, Ptr< LogFieldAliasMap > map, SetFunc _setFunc=NULL)
 LogField (const char *field, Container container, SetFunc _setFunc=NULL)
 LogField (const LogField &rhs)
 ~LogField ()
unsigned marshal_len (LogAccess *lad)
unsigned marshal (LogAccess *lad, char *buf)
unsigned marshal_agg (char *buf)
unsigned unmarshal (char **buf, char *dest, int len)
void display (FILE *fd=stdout)
bool operator== (LogField &rhs)
void updateField (LogAccess *lad, char *val, int len)
char * name ()
char * symbol ()
Type type ()
Ptr< LogFieldAliasMapmap ()
Aggregate aggregate ()
bool is_time_field ()
void set_aggregate_op (Aggregate agg_op)
void update_aggregate (int64_t val)
 LINK (LogField, link)

Static Public Member Functions

static Container valid_container_name (char *name)
static Aggregate valid_aggregate_name (char *name)
static bool fieldlist_contains_aggregates (char *fieldlist)

Data Fields

LogSlice m_slice

Detailed Description

Definition at line 74 of file LogField.h.


Member Typedef Documentation

typedef int(LogAccess::* LogField::MarshalFunc)(char *buf)

Definition at line 77 of file LogField.h.

typedef void(LogAccess::* LogField::SetFunc)(char *buf, int len)

Definition at line 81 of file LogField.h.

typedef int(* LogField::UnmarshalFunc)(char **buf, char *dest, int len)

Definition at line 78 of file LogField.h.

typedef int(* LogField::UnmarshalFuncWithMap)(char **buf, char *dest, int len, Ptr< LogFieldAliasMap > map)

Definition at line 80 of file LogField.h.

typedef int(* LogField::UnmarshalFuncWithSlice)(char **buf, char *dest, int len, LogSlice *slice)

Definition at line 79 of file LogField.h.


Member Enumeration Documentation

Enumerator:
NO_AGGREGATE 
eCOUNT 
eSUM 
eAVG 
eFIRST 
eLAST 
N_AGGREGATES 

Definition at line 112 of file LogField.h.

Enumerator:
NO_CONTAINER 
CQH 
PSH 
PQH 
SSH 
CSSH 
ECQH 
EPSH 
EPQH 
ESSH 
ECSSH 
ICFG 
SCFG 
RECORD 
N_CONTAINERS 

Definition at line 93 of file LogField.h.

Enumerator:
sINT 
dINT 
STRING 
IP 

IP Address.

N_TYPES 

Definition at line 84 of file LogField.h.


Constructor & Destructor Documentation

LogField::LogField ( const char *  name,
const char *  symbol,
Type  type,
MarshalFunc  marshal,
UnmarshalFunc  unmarshal,
SetFunc  _setFunc = NULL 
)

Definition at line 144 of file LogField.cc.

References ink_assert, LogField(), and N_TYPES.

Referenced by LogField().

LogField::LogField ( const char *  name,
const char *  symbol,
Type  type,
MarshalFunc  marshal,
UnmarshalFuncWithMap  unmarshal,
Ptr< LogFieldAliasMap map,
SetFunc  _setFunc = NULL 
)

Definition at line 160 of file LogField.cc.

References ink_assert, LogField(), and N_TYPES.

LogField::LogField ( const char *  field,
Container  container,
SetFunc  _setFunc = NULL 
)

Definition at line 179 of file LogField.cc.

References CQH, CSSH, ECQH, ECSSH, EPQH, EPSH, ESSH, ICFG, ink_assert, LogField(), N_TYPES, Note, PQH, PSH, RECORD, SCFG, SSH, and LogAccess::unmarshal_str().

LogField::LogField ( const LogField rhs  ) 

Definition at line 222 of file LogField.cc.

References ink_assert, LogField(), and N_TYPES.

LogField::~LogField (  ) 

Definition at line 235 of file LogField.cc.

References ats_free().


Member Function Documentation

Aggregate LogField::aggregate (  )  [inline]

Definition at line 155 of file LogField.h.

Referenced by LogBuffer::resolve_custom_entry().

void LogField::display ( FILE *  fd = stdout  ) 

Definition at line 398 of file LogField.cc.

bool LogField::fieldlist_contains_aggregates ( char *  fieldlist  )  [static]

Definition at line 495 of file LogField.cc.

References aggregate_names.

bool LogField::is_time_field (  )  [inline]

Definition at line 159 of file LogField.h.

Referenced by LogObject::log().

LogField::LINK ( LogField  ,
link   
)
Ptr<LogFieldAliasMap> LogField::map (  )  [inline]

Definition at line 152 of file LogField.h.

Referenced by LogFilterInt::LogFilterInt().

unsigned LogField::marshal ( LogAccess lad,
char *  buf 
)
unsigned LogField::marshal_agg ( char *  buf  ) 

Definition at line 338 of file LogField.cc.

References eAVG, eCOUNT, eFIRST, eLAST, eSUM, ink_assert, LogAccess::marshal_int(), and Note.

unsigned LogField::marshal_len ( LogAccess lad  ) 
char* LogField::name (  )  [inline]

Definition at line 140 of file LogField.h.

Referenced by operator==().

bool LogField::operator== ( LogField rhs  ) 

Definition at line 417 of file LogField.cc.

References name(), and symbol().

void LogField::set_aggregate_op ( LogField::Aggregate  agg_op  ) 

Definition at line 428 of file LogField.cc.

References N_AGGREGATES, and Note.

Referenced by LogFormat::parse_symbol_string().

char* LogField::symbol (  )  [inline]
Type LogField::type (  )  [inline]

Definition at line 148 of file LogField.h.

Referenced by LogFieldList::add(), and LogFormat::parse_symbol_string().

unsigned LogField::unmarshal ( char **  buf,
char *  dest,
int  len 
)
void LogField::update_aggregate ( int64_t  val  ) 

Definition at line 440 of file LogField.cc.

References Debug, eAVG, eCOUNT, eFIRST, eLAST, eSUM, and Note.

Referenced by LogObject::log().

void LogField::updateField ( LogAccess lad,
char *  val,
int  len 
)

Definition at line 285 of file LogField.cc.

References NO_CONTAINER.

Referenced by LogFilterString::wipe_this_entry().

LogField::Aggregate LogField::valid_aggregate_name ( char *  name  )  [static]

Definition at line 484 of file LogField.cc.

References aggregate_names.

Referenced by LogFormat::parse_symbol_string().

LogField::Container LogField::valid_container_name ( char *  name  )  [static]

Definition at line 473 of file LogField.cc.

References container_names.

Referenced by LogFormat::parse_symbol_string().


Field Documentation

Definition at line 188 of file LogField.h.

Referenced by LogFormat::parse_symbol_string(), and unmarshal().


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