#include <TextFormat.h>
Inheritance diagram for Tagcoll::TextFormat< ITEM, TAG >:


Public Member Functions | |
| TextFormat (const Converter< ITEM, std::string > &itemconv, const Converter< TAG, std::string > &tagconv, FILE *out) | |
| virtual | ~TextFormat () |
Static Public Member Functions | |
| static void | outputPatch (Converter< ITEM, std::string > &itemconv, Converter< TAG, std::string > &tagconv, const PatchList< ITEM, TAG > &patch, FILE *out) |
| Serialize a patch. | |
| static void | parse (Converter< std::string, ITEM > &itemconv, Converter< std::string, TAG > &tagconv, ParserInput &in, Consumer< ITEM, TAG > &consumer) |
| Parse a tagged collection, sending the data to `consumer'. | |
| static PatchList< ITEM, TAG > | parsePatch (Converter< std::string, ITEM > &itemconv, Converter< std::string, TAG > &tagconv, ParserInput &in) |
| Parse a tagcoll patch. | |
Protected Member Functions | |
| virtual void | consumeItemUntagged (const ITEM &item) |
| Process an untagged item. | |
| virtual void | consumeItem (const ITEM &item, const OpSet< TAG > &tags) |
| Process a tagged item, with its tags. | |
| virtual void | consumeItemsUntagged (const OpSet< ITEM > &items) |
| Process a set of items, all with no tags. | |
| virtual void | consumeItems (const OpSet< ITEM > &items, const OpSet< TAG > &tags) |
| Process a set of items identically tagged, with their tags. | |
Protected Attributes | |
| const Converter< ITEM, std::string > & | itemconv |
| const Converter< TAG, std::string > & | tagconv |
| FILE * | out |
The format of the output is: lines of "comma+space"-separated items, followed by "colon+space", followed by the corresponding "comma+space"-separated tags. Examples: ITEM: ITEM: TAG ITEM: TAG1, TAG2, TAG3 ITEM1, ITEM2, ITEM3: ITEM1, ITEM2, ITEM3: TAG1, TAG2, TAG3
| Tagcoll::TextFormat< ITEM, TAG >::TextFormat | ( | const Converter< ITEM, std::string > & | itemconv, | |
| const Converter< TAG, std::string > & | tagconv, | |||
| FILE * | out | |||
| ) | [inline] |
| virtual Tagcoll::TextFormat< ITEM, TAG >::~TextFormat | ( | ) | [inline, virtual] |
| void TextFormat::consumeItemUntagged | ( | const ITEM & | item | ) | [protected, virtual] |
| void TextFormat::consumeItem | ( | const ITEM & | item, | |
| const OpSet< TAG > & | tags | |||
| ) | [protected, virtual] |
| void TextFormat::consumeItemsUntagged | ( | const OpSet< ITEM > & | items | ) | [protected, virtual] |
| void TextFormat::consumeItems | ( | const OpSet< ITEM > & | items, | |
| const OpSet< TAG > & | tags | |||
| ) | [protected, virtual] |
Process a set of items identically tagged, with their tags.
Reimplemented from Tagcoll::Consumer< ITEM, TAG >.
| void TextFormat::outputPatch | ( | Converter< ITEM, std::string > & | itemconv, | |
| Converter< TAG, std::string > & | tagconv, | |||
| const PatchList< ITEM, TAG > & | patch, | |||
| FILE * | out | |||
| ) | [static] |
Serialize a patch.
| void TextFormat::parse | ( | Converter< std::string, ITEM > & | itemconv, | |
| Converter< std::string, TAG > & | tagconv, | |||
| ParserInput & | in, | |||
| Consumer< ITEM, TAG > & | consumer | |||
| ) | [static] |
Parse a tagged collection, sending the data to `consumer'.
| PatchList< ITEM, TAG > TextFormat::parsePatch | ( | Converter< std::string, ITEM > & | itemconv, | |
| Converter< std::string, TAG > & | tagconv, | |||
| ParserInput & | in | |||
| ) | [static] |
Parse a tagcoll patch.
const Converter<ITEM, std::string>& Tagcoll::TextFormat< ITEM, TAG >::itemconv [protected] |
const Converter<TAG, std::string>& Tagcoll::TextFormat< ITEM, TAG >::tagconv [protected] |
FILE* Tagcoll::TextFormat< ITEM, TAG >::out [protected] |
1.5.1