]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/NoteData.cc
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
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.
11 #include "acl/Checklist.h"
12 #include "acl/NoteData.h"
13 #include "acl/StringData.h"
14 #include "ConfigParser.h"
18 ACLNoteData::ACLNoteData() : values(new ACLStringData
)
21 ACLNoteData::~ACLNoteData()
27 ACLNoteData::match(NotePairs::Entry
*entry
)
29 return !entry
->name
.cmp(name
.termedBuf()) && values
->match(entry
->value
.termedBuf());
33 ACLNoteData::dump() const
36 sl
.push_back(SBuf(name
));
37 #if __cplusplus >= 201103L
38 sl
.splice(sl
.end(), values
->dump());
40 // temp is needed until c++11 move constructor
41 SBufList temp
= values
->dump();
42 sl
.splice(sl
.end(), temp
);
50 char* t
= ConfigParser::strtokFile();
57 ACLNoteData::empty() const
59 return name
.size() == 0;
62 ACLData
<NotePairs::Entry
*> *
63 ACLNoteData::clone() const
65 ACLNoteData
* result
= new ACLNoteData
;
66 result
->values
= dynamic_cast<ACLStringData
*>(values
->clone());
67 assert(result
->values
);