#include <Notes.h>

Inheritance diagram for Notes:
Collaboration diagram for Notes:

Public Types

typedef RefCount< NotesPointer
 
typedef std::vector
< Note::Pointer
NotesList
 
typedef NotesList::iterator iterator
 iterates over the notes list More...
 
typedef NotesList::const_iterator const_iterator
 iterates over the notes list More...
 

Public Member Functions

 Notes (const char *aDescr, const char **metasBlacklist, bool allowFormatted=true)
 
 Notes ()
 
 ~Notes ()
 
 Notes (const Notes &)=delete
 
Notesoperator= (const Notes &)=delete
 
Note::Pointer parse (ConfigParser &parser)
 Parses a notes line and returns a pointer to the parsed Note object. More...
 
void parseKvPair ()
 Parses an annotate line with "key=value" or "key+=value" formats. More...
 
void dump (StoreEntry *entry, const char *name)
 Dump the notes list to the given StoreEntry object. More...
 
void clean ()
 clean the notes list More...
 
iterator begin ()
 points to the first argument More...
 
iterator end ()
 points to the end of list More...
 
bool empty () const
 
const char * toString (const char *sep="\r\n") const
 
void updateNotePairs (NotePairsPointer pairs, const CharacterSet *delimiters, const AccessLogEntryPointer &al)
 

Private Member Functions

void validateKey (const SBuf &key) const
 
Note::Pointer add (const SBuf &noteKey)
 
Note::Pointer find (const SBuf &noteKey)
 

Private Attributes

NotesList notes
 The Note::Pointer objects array list. More...
 
const char * descr
 A short description for notes list. More...
 
const char ** blacklisted
 Null terminated list of blacklisted note keys. More...
 
bool formattedValues
 Whether the formatted values are supported. More...
 

Detailed Description

Used to store a notes configuration list.

Definition at line 108 of file Notes.h.

Member Typedef Documentation

typedef NotesList::const_iterator Notes::const_iterator

Definition at line 114 of file Notes.h.

typedef NotesList::iterator Notes::iterator

Definition at line 113 of file Notes.h.

Definition at line 112 of file Notes.h.

Definition at line 111 of file Notes.h.

Constructor & Destructor Documentation

Notes::Notes ( const char *  aDescr,
const char **  metasBlacklist,
bool  allowFormatted = true 
)
inline

Definition at line 116 of file Notes.h.

Notes::Notes ( )
inline

Definition at line 117 of file Notes.h.

Notes::~Notes ( )
inline

Definition at line 118 of file Notes.h.

References notes.

Notes::Notes ( const Notes )
delete

Member Function Documentation

Note::Pointer Notes::add ( const SBuf noteKey)
private

Adds a note to the notes list and returns a pointer to the related Note object. If the note key already exists in list, returns a pointer to the existing object. If keyLen is not provided, the noteKey is assumed null-terminated.

Definition at line 126 of file Notes.cc.

References Note::Note(), and p.

iterator Notes::begin ( )
inline

Definition at line 134 of file Notes.h.

References notes.

void Notes::clean ( )
inline

Definition at line 131 of file Notes.h.

References notes.

Referenced by free_note().

void Notes::dump ( StoreEntry entry,
const char *  name 
)

Definition at line 221 of file Notes.cc.

Referenced by dump_note().

bool Notes::empty ( ) const
inline
Returns
true if the notes list is empty

Definition at line 138 of file Notes.h.

References notes.

Referenced by accessLogInit(), and ACLAnnotationData::empty().

iterator Notes::end ( )
inline

Definition at line 136 of file Notes.h.

References notes.

Note::Pointer Notes::find ( const SBuf noteKey)
private

Definition at line 135 of file Notes.cc.

Notes& Notes::operator= ( const Notes )
delete
const char * Notes::toString ( const char *  sep = "\r\n") const

Convert Notes list to a string consist of "Key: Value" entries separated by sep string.

Definition at line 228 of file Notes.cc.

References SBuf::append(), SBuf::c_str(), SBuf::clear(), and SBuf::isEmpty().

Referenced by ACLAnnotationData::dump().

void Notes::updateNotePairs ( NotePairsPointer  pairs,
const CharacterSet delimiters,
const AccessLogEntryPointer al 
)

Definition at line 214 of file Notes.cc.

Referenced by ACLAnnotationData::annotate().

void Notes::validateKey ( const SBuf key) const
private

Verifies that the key is not blacklisted (fatal error) and does not contain special characters (non-fatal error). If keyLen is not provided, the key is assumed null-terminated.

Definition at line 144 of file Notes.cc.

References CharacterSet::ALPHA, cfg_filename, SBuf::cmp(), config_lineno, DBG_CRITICAL, debugs, CharacterSet::DIGIT, fatalf(), SBuf::findFirstNotOf(), i, SBuf::length(), SBuf::npos, and SBuf::rawContent().

Member Data Documentation

const char** Notes::blacklisted
private

Definition at line 160 of file Notes.h.

const char* Notes::descr
private

Definition at line 159 of file Notes.h.

bool Notes::formattedValues
private

Definition at line 161 of file Notes.h.

NotesList Notes::notes
private

Definition at line 158 of file Notes.h.

Referenced by begin(), clean(), empty(), end(), and ~Notes().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors