+/*
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
#ifndef _SQUID_FORMAT_TOKEN_H
#define _SQUID_FORMAT_TOKEN_H
class Token
{
public:
- Token() : type(LFT_NONE),
- label(NULL),
- widthMin(-1),
- widthMax(-1),
- quote(LOG_QUOTE_NONE),
- left(false),
- space(false),
- zero(false),
- divisor(1),
- next(NULL)
- { data.string = NULL; }
-
+ Token();
~Token();
/// Initialize the format token registrations
ByteCode_t type;
const char *label;
- union {
+ struct {
char *string;
struct {
char *element;
char separator;
} header;
- char *timespec;
} data;
int widthMin; ///< minimum field width
int widthMax; ///< maximum field width
bool space;
bool zero;
int divisor; // class invariant: MUST NOT be zero.
- Token *next; /* todo: move from linked list to array */
+ Token *next; /* todo: move from linked list to array */
private:
const char *scanForToken(TokenTableEntry const table[], const char *cur);
} // namespace Format
#endif /* _SQUID_FORMAT_TOKEN_H */
+