rem: OSGStatePtr state = OSGState::create();
add: StatePtr state = State::create();
context: int main( int argc, char *argv[] ){	osgInit(argc, argv);	OSGStateChunkClass::iterator it;		cerr << "StateChunk classes:" << endl;		for ( it = OSGStateChunkClass::begin(); it != OSGStateChunkClass::end(); it++ )	{		cerr << *it << endl;	}	OSGTransformChunkPtr tchunk = OSGTransformChunk::create();	cerr << "Transform chunk class: " << tchunk->getClassID() << endl;	OSGMatrix m;		tchunk->setMatrix( m );	OSGLightChunkPtr lchunks[9];		for ( int i = 0; i < 9; i++ )		lchunks[i] = OSGLightChunk::create();	cerr << "Light chunk class: " << lchunks[0]->getClassID() << endl;	// State	OSGStatePtr state = OSGState::create();	state->print();	cerr << "TransforChunk present? " 		 << (state->chunkPresent( tchunk->getClassID() )?"Yes":"No") << endl;	cerr << "TransforChunk present (class)? " 		 << (state->chunkPresent( tchunk )?"Yes":"No") << endl;	state->addChunk( tchunk );	state->print();	cerr << "TransforChunk present? " 		 << (state->chunkPresent( tchunk->getClassID() )?"Yes":"No") << endl;	cerr << "TransforChunk present (class)? " 		 << (state->chunkPresent( tchunk )?"Yes":"No") << endl;	cerr << "Test the multiple light chunks..." << endl;	cerr << "Single add..." << endl;	state->addChunk( lchunks[0], -1 );	state->print();	cerr << "Specific set (index = 2)..." << endl;	state->addChunk( lchunks[1], 2 );	state->print();	cerr << "Multiple adds..." << endl;	state->addChunk( lchunks[2], -1 );	state->addChunk( lchunks[3], -1 );	state->addChunk( lchunks[4], -1 );	state->addChunk( lchunks[5], -1 );	state->addChunk( lchunks[6], -1 );	state->addChunk( lchunks[7], -1 );	state->print();		cerr << "This one shouldn't work..." << endl;	state->addChunk( lchunks[8], -1 );	state->print();		cerr << "Now try to get rid of them..." << endl;		cerr << "direct index (0)" << endl;	state->subChunk( lchunks[0], 0 );	state->print();	cerr << "automatic find (last)" << endl;		state->subChunk( lchunks[7] );	state->print();		cerr << "automatic find (rest)" << endl;		state->subChunk( lchunks[1] );	state->subChunk( lchunks[2] );	state->subChunk( lchunks[3] );	state->subChunk( lchunks[4] );	state->subChunk( lchunks[5] );	state->subChunk( lchunks[6] );	state->subChunk( tchunk );	state->print();	cerr << "should be empty now" << endl;			return 0;}