[CLAM] Re: [mtg] CLAM release 0.7

Pau Arumi parumi at iua.upf.es
Fri Nov 26 09:54:04 PST 2004

> Is there any example about how to use the new PhantomBuffer?
> thx
> Julien

Well yes, we have the (automatic) tests that acts also as examples.
Check this source file that comes in the CLAM tarball:


But the phantom buffer is an internal implementation of the data streaming (accessed through in/out ports).
When you program using CLAM you interact with the data-stream always through the processing ports, thus this class is meant to be an internal or private think of the framework. 

But of course, these internal things can be (re)used for whatsoever you find suitable.

Or maybe you might elaborate on what you are trying to do with the PhantomBuffer ...


these are the test suite on PhantomBuffer :

CPPUNIT_TEST_SUITE( TestsPhantomBufferStream );
CPPUNIT_TEST( testStreamDontIncreasesSizeAfterProducing );
CPPUNIT_TEST( testStreamIncreasesSizeAfterLinkingWithBiggerRegion );
CPPUNIT_TEST( testPhantomBufferIncreasesAfterLinkingWithBiggerRegion );
CPPUNIT_TEST( testInsertionPositionInLogicalZone_afterLinkingWithBiggerRegion );
CPPUNIT_TEST( testLogicalSizeIncreases_whenWriterIncreasesItsSize );
CPPUNIT_TEST( testLogicalSizeRemainsTheSame_whenWriterDecreasesItsSize );
CPPUNIT_TEST( testLogicalSizeIncreases_whenReaderIncreasesItsSize );
CPPUNIT_TEST( testWriterRegionCantProduce_whenOverlapsReadingRegion );
CPPUNIT_TEST( testWriting_rearmostPos_when2ReadingRegions );
CPPUNIT_TEST( testWriter_sizeReservesSizePowOf2 );
CPPUNIT_TEST( testPhantomZoneGetsUpdated_whenWroteInBeginningZone );
CPPUNIT_TEST( testBeginningZoneGetsUpdated_whenWroteInPhantomZone );
CPPUNIT_TEST( testPhantomZoneGetsUpdated_whenInsertedInLogicalZone );
CPPUNIT_TEST( testIntegrityAfterBufferResize );
CPPUNIT_TEST( testWriterResizes_whenRearmostReaderHasSameBeginDistance );
CPPUNIT_TEST( testReadingRegion_canReadInPhantomZone );

More information about the clam-users mailing list