avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Tagunov" <atagu...@list.ru>
Subject MutableConfiguration - I feel an issue
Date Tue, 10 Feb 2004 15:56:28 GMT
From: Anton Tagunov [AT]

AT> How do I create the following structure?

AT> <a>
AT>    <b>1</b>
AT>    <b>2</b>
AT> </a>

AT> No way to do it.

From: Leo Sutic [LSU]

LSU> addChild(Configuration config)

Hold on for a second!
Will my code look like this?

/**
 * This method adds two child configuration nodes
 *
 *   <b>1</b>
 *   <b>2</b>
 *
 * to the configuration node <code>node</code>
 *
 * @param node the node to add two new sub-nodes to
 */
void amendConfig( final MutableConfiguration node )
{
    final DefaultConfiguration b1 = new DefaultConfiguration( "b" );
    b1.setValue( 1 );
    final DefaultConfiguration b2 = new DefaulcConfiguration( "b" );
    b2.setValue( 2 );
    node.addChild( b1 );
    node.addChild( b2 );
}

And I thought we would got rid of the dependency on DefaultConfiguration!

Anton

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message