]> git.ipfire.org Git - thirdparty/squid.git/commit
Update Notes API to support key=pair additions and lookup
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 6 Nov 2012 22:32:56 +0000 (11:32 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 6 Nov 2012 22:32:56 +0000 (11:32 +1300)
commitbc6003497aac5b97c47754092fe2d9c356f02bfe
tree183a152db98aa25202d4b4950b1a246172d15eb5
parent84dc29dab524cc4dbdfee0bed2ec8c3e2df9f674
Update Notes API to support key=pair additions and lookup

* Adds a Notes::const_iterator definition to match Notes::iterator

* Adds a Notes::findByName(note-name) method to locate notes given their
  textual key / name string.

* Adds a Notes::add(key, value) method to insert key and value as a
  single operation. No more need for callers to be using Note::Pointer
  or be aware of the Note:: API just to insert the value.

TODO:

* add "key=value" syntax parser to Notes. The current parse() method
  onlyl accepts MiME header syntax (line- and whitespace- oriented).

* add ostream operator to dump the notes list content to a stream.
src/Notes.cc
src/Notes.h