メインページ | ネームスペース一覧 | クラス階層 | 構成 | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ

ネームスペース gslib::sapling


構成

class  scribbler
 いんちき木落書きツール [詳細]

class  tree
 STL コンテナ風の木クラス。. [詳細]

struct  tree::link
struct  tree::root_end
struct  tree::value_holder
class  tree::node
 実際にアロケーションをするクラス [詳細]

class  tree::iterator_base
class  tree::const_sibling_iterator
class  tree::const_post_order_iterator
class  tree::const_pre_order_iterator

関数

template<typename Value, typename Allocator> void dump (const tree< Value, Allocator > &t, std::ostream &ostr, const char *indent="\t")
 木をダンプする

template<typename Value, typename Allocator> scribbler< Value, Allocator > scribble (tree< Value, Allocator > &t)
 
tree< int > t; scribble( t ) .b( 0 ) // 子を持つノードは .b()。xml での <tag> ( 1 ) ( 2 ) // 子を持たないノードは []。xml での <tag/> .b( 3 ).e() // .b( ? ).e() と () は同じ .e() ( 4 ) ( 5 ) .b( 6 ) ( 7 ) ( 8 ) .e() ( 9 ) .e() ( 10 ) .e(); // 終了タグ .e()。xml での </tag>



関数

template<typename Value, typename Allocator>
void dump const tree< Value, Allocator > &  t,
std::ostream &  ostr,
const char *  indent = "\t"
[inline]
 

木をダンプする

dump.h66 行で定義されています。

参照先 gslib::sapling::tree< Value, Allocator >::end(), と tree_type.

00066                                                                                                            {
00067             typedef tree< Value, Allocator >                        tree_type;
00068             typedef typename tree_type::const_pre_order_iterator    iterator;
00069             typedef typename tree_type::size_type                   size_type;
00070             for ( iterator it = t.begin_pre_order(); it != t.end(); ++it ) {
00071                 for ( size_type i = 0; i < it.depth(); ++i ) {
00072                     ostr << indent;
00073                 }
00074                 ostr << *it;
00075                 ostr << std::endl;
00076             }
00077         }

関数の呼び出しグラフ:

template<typename Value, typename Allocator>
scribbler< Value, Allocator > scribble tree< Value, Allocator > &  t  ) 
 

tree< int > t; scribble( t ) .b( 0 ) // 子を持つノードは .b()。xml での <tag> ( 1 ) ( 2 ) // 子を持たないノードは []。xml での <tag/> .b( 3 ).e() // .b( ? ).e() と () は同じ .e() ( 4 ) ( 5 ) .b( 6 ) ( 7 ) ( 8 ) .e() ( 9 ) .e() ( 10 ) .e(); // 終了タグ .e()。xml での </tag>

scribble.h118 行で定義されています。

参照先 gslib::sapling::tree< Value, Allocator >::empty().

00118                                                                               {
00119             BOOST_ASSERT( true == t.empty() );
00120             return scribbler< Value, Allocator >( t );
00121         }

関数の呼び出しグラフ:


saplingに対してSat Nov 27 15:03:39 2004に生成されました。 doxygen 1.3.6