Laxkit
0.0.7.1
|
A tagged object manager, to make searching for sets of objects with specified tags easier. More...
Public Member Functions | |
virtual int | RemoveTag (const char *tag) |
virtual int | RemoveTag (int i) |
Remove tag index i. | |
virtual void | FlushTags () |
virtual int | AddObject (Tagged *obj) |
virtual int | RemoveObject (Tagged *obj) |
Remove object from being referenced by taginfo. | |
Public Member Functions inherited from Laxkit::Tagged | |
virtual int | HasTag (const char *tag, int casematters) |
Return whether the tag exists. | |
virtual int | NumberOfTags () |
Return the number of tags, strangely enough. | |
virtual const char * | GetTag (int i) |
Return const pointer to the tag text for tag number i, where i==0 is the first tag. | |
virtual char * | GetAllTags () |
Return a new char[] with a space separated list of all the tags. | |
virtual int | InsertTags (const char *tags, int casematters) |
Insert tags from a string such as 'tag1 tag2 tag3 "tag with spaces" tag4'. | |
virtual int | InsertTag (const char *tag, int casematters) |
Insert tag if it doesn't exist already. |
Public Attributes | |
int | keep_empty_tags |
Public Attributes inherited from Laxkit::Tagged | |
int | sorttags |
Protected Attributes | |
PtrStack< TagCloudInfo > | taginfo |
Protected Attributes inherited from Laxkit::Tagged | |
PtrStack< char > | list_of_tags |
A tagged object manager, to make searching for sets of objects with specified tags easier.
Return 0 for success, nonzero for error.
References Laxkit::PtrStack< T >::e, Laxkit::Tagged::GetTag(), Laxkit::Tagged::HasTag(), Laxkit::Tagged::InsertTag(), Laxkit::Tagged::NumberOfTags(), and Laxkit::PtrStack< T >::push().
Remove object from being referenced by taginfo.
Return 1 for object removed, no change in tag list. Return 2 for object removed, and some tags are gone now. Return a negative number for some error.
References Laxkit::PtrStack< T >::e, Laxkit::PtrStack< T >::findindex(), Laxkit::Tagged::HasTag(), Laxkit::PtrStack< T >::n, and Laxkit::PtrStack< T >::remove().