[Clam-devel] [PATCH] (work-in-progress) ProcessingFactory managing Metadata
parumi at iua.upf.edu
parumi at iua.upf.edu
Fri Jul 6 08:25:08 PDT 2007
Commited on revision 10361. Good to see this progress!
It needs some slight revision but I don't have time to comment now, I'm in
an interesting Asterisk talk at JPL.
Cheers!
pau
PS: our talk went very well. Even the sloppy firewire driver of my saffire
behaved enough!
On Fri, 6 Jul 2007, Andreas Calvo wrote:
> Finishied coding the ProcessingFactory metadata support, now moving to use
> it on the ProcessingTree of NetworkEditor.
>
> Methods:
> - GetListOfKeys(attribute, value): returns a list of Keys that have
> "attribute" with "value".
> - GetValuesFor(attribute): returns a list of Values of unique occurrence of
> "attribute" in all processings stored.
> - GetValuesOf(key): returns a list of Attributes of "key".
> - GetValuesFrom(key, attribute): returns a list of Values from "key" that
> matches attribute name "attribute".
> - AddAttribute(key, name, value): add a new attribute "name" with "value" to
> "key". (TODO: check if "key" exists on the Factory).
> - ProcessingsClear: clears the ProcessingFactory. (TODO: clear a specific
> key? or attribute?)
> - ProcessingCount: return the elements on the ProcessingFactory
>
> Type Definitions:
> - Key (currently type from RegistryKey)
> - Keys (list of type Key)
> - Value (std::string)
> - Values (list of Value)
> - Attribute (struct with a std::string Name and a Value)
> - Attributes (list of type Attribute)
> - ProcessingAttributes (map with Key and Attributes)
>
> Note: check the ProcessingFactoryTest.cxx under test/UnitTests to see a more
> comprensive example.
>
> WARNING: Pau, this is not based on latest repository update, so it will need
> to do some workaround.
>
> On 7/5/07, Pau Arumi <parumi at iua.upf.edu> wrote:
>>
>> En/na Andreas Calvo ha escrit:
>> > This patch the early steps to add and manage metadata to the Processing
>> > Factory.
>> > Now it does uses a string to store metadata, but it will change to a
>> > struct (for easy manage).
>> > With this patch it is possible to retrieve information of a given
>> > category and of a given key.
>> > New methods will be added:
>> > - to retrieve information for a key and attributes
>> > - to retrieve attributes (no values) from a key
>> > - to retrieve unique names of attributes
>> >
>> >
>> > any suggestion will be really appreciated
>>
>>
>> Although not finished I've committed it (revision 10349) with
>> implementation comments in ProcessingFactory.*xx
>> and new tests to be passed (now commented out).
>>
>> An advice:try to do it test-driven which means: implement only the
>> simpler code that pass the current tests.
>>
>> // CPPUNIT_TEST( testAddAttribute_nonExistingKey );
>> // CPPUNIT_TEST( testGetValueFor_nonExistingKey );
>> // CPPUNIT_TEST( testGetValueFor_nonExistingAttribute );
>> // CPPUNIT_TEST( testGetValueFor_existingAttribute );
>>
>>
>>
>> _______________________________________________
>> Clam-devel mailing list
>> Clam-devel at llistes.projectes.lafarga.org
>> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>>
>
More information about the clam-devel
mailing list