[Debtags-devel] libtagcoll updates
Enrico Zini
enrico@enricozini.org
Thu, 31 Mar 2005 15:51:19 +0200
--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hello,
I've done a bit of work on libtagcoll, resulting in a major update.
Here's a summary of the changes:
+ Added unit-test suite invocable with make check
(Finally!!)
+ Added DiskIndex, Serializer, TDBDiskIndex
TDBDiskIndex is an on-disk index of tag data.
(Thanks Erich for the pioneer TDB work! Unfortunately, I
couldn't use your code, because I need to index slightly different
things)
Serializer goes from ANY to string and from string to ANY. This
allows to have a single point where to covert whatever is used as
ITEM or TAG into a string that can be written somewhere.
=20
+ Only build the static library
+ Only package the -dev version
(Finally!!)
This means that, hopefully, ABI changes will stop breaking existing
packages.
API changes will still be annoying, though.
+ Can detect out-of-space errors while writing tag collections
(TagcollSerializer wasn't checking the return code of fprintf, and
changing it would have meant to break libtagcoll binary
compatibility: now I can do it since I only package -dev packages)
+ Renamed TagToString.h in SerializationFilters.h and generalised it using
the new Serializer class
Warning: API change
+ Made ExpressionFilter a template for the item part
+ Added TaggedCollection interface
Finally, a single interface to all implementations of tagged
collections!
=20
+ InputMerger implements TaggedCollection
Warning: API change: The previous getTagsetForItem becomes getTags
+ Make DiskIndex implements TaggedCollection
+ Generalised the Patch system
Finally patches can cope with non-string tags!
Warning: API change
+ Unified TagcollChange and the patch system
Finally Tagcoll::Change is not an ugly hack anymore, but it's nicely
integrated with the patch system.
Warning: API change: TagcollChange replaced with PatchList
+ Make TagCollection implement TaggedCollection
Warning: API change
+ Make a TDBReadonlyDiskIndex, that keeps the changes in an internal patch
This is cool: it uses an existing TDB index, opened read only, and
maitnains all the changes into an internal patch. Makes for the
perfect back-end support to debtags-edit and all applications running
as a user.
+ TagcollSerializer should take a Serializer parameter
+ Merged TagcollParser into TextFormat
Finally generalized the serializer and the parser.
Warning: API change: TagcollSerializer renamed in TextFormat
Warning: API change: TextFormat now wants a Serializer
Warning: API change: TagcollParser is now TextFormat
Warning: API change: TagcollParser::parseTagcoll is now TextFormat::parse
Warning: API change: the parser which applied instantiations and whatnot=
has been removed
+ Serialize and parse the new patch
Warning: API change: patches cannot be serialized using a normal
TagcollConsumer anymore; there are now appropriate functions in
TextFormat
I've upgraded tagcoll and tagcolledit to the new API; I'll now start
propagating the changes into libdebtags, debtags and debtags-edit.
At the end of this I intend to have an efficient, indexed, on-disk tag
database, so that applications that want to fiddle with tags do not need
to keep everything in memory.
Ciao,
Enrico
--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico@debian.org>
--zhXaljGHf11kAtnf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCTABX9LSwzHl+v6sRAl0WAJ9WwF9FljkPbs3LqzBRi6RaEReKUACcDOLY
7Fn7e0mEDDLNANcdHokt7SM=
=f+C9
-----END PGP SIGNATURE-----
--zhXaljGHf11kAtnf--