AnnotationData.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#include "squid.h"
10#include "acl/Acl.h"
11#include "acl/AnnotationData.h"
12#include "acl/Checklist.h"
13#include "cache_cf.h"
14#include "ConfigParser.h"
15#include "debug/Stream.h"
16#include "format/Format.h"
17#include "sbuf/Algorithms.h"
18
20 : notes(new Notes("annotation_data")) {}
21
24{
25 SBufList sl;
26 if (const char *strNotes = notes->toString())
27 sl.push_back(SBuf(strNotes));
28 return sl;
29}
30
31void
33{
35 if (char *t = ConfigParser::PeekAtToken()) {
36 debugs(29, DBG_CRITICAL, "FATAL: Unexpected argument '" << t << "' after annotation specification");
38 return;
39 }
40}
41
42void
44{
45 notes->updateNotePairs(pairs, delimiters, al);
46}
47
void self_destruct(void)
Definition: cache_cf.cc:277
SBufList dump() const override
void parse() override
void annotate(NotePairs::Pointer pairs, const CharacterSet *delimiters, const AccessLogEntry::Pointer &al)
Stores annotations into pairs.
Notes::Pointer notes
optimized set of C chars, with quick membership test and merge support
Definition: CharacterSet.h:18
static char * PeekAtToken()
Definition: Notes.h:109
const char * toString(const char *sep="\r\n") const
Definition: Notes.cc:262
void updateNotePairs(NotePairsPointer pairs, const CharacterSet *delimiters, const AccessLogEntryPointer &al)
Definition: Notes.cc:248
void parseKvPair()
Parses an annotate line with "key=value" or "key+=value" formats.
Definition: Notes.cc:223
Definition: SBuf.h:94
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:194
#define DBG_CRITICAL
Definition: Stream.h:37
std::list< SBuf > SBufList
Definition: forward.h:23

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors