lestes::lang::cplus::syn::pack_streamer Class Reference

Inheritance diagram for lestes::lang::cplus::syn::pack_streamer:

lestes::lang::cplus::syn::streamer lestes::std::object lestes::std::mem::keystone List of all members.

Public Member Functions

virtual ptr< bison_tokenfirst ()
virtual ptr< bison_tokennext ()

Static Public Member Functions

static ptr< pack_streamercreate (ptr< bison_pack_token > tp)

Protected Member Functions

 pack_streamer (ptr< bison_pack_token > tp)
void gc_mark ()
 Marks the keystone.

Private Attributes

bool eof_sent
srp< bison_pack_tokentokpack
token_list_type::iterator it

Detailed Description

Definition at line 110 of file manager.cc.


Constructor & Destructor Documentation

lestes::lang::cplus::syn::pack_streamer::pack_streamer ( ptr< bison_pack_token tp  )  [inline, protected]

Definition at line 116 of file manager.cc.

00117                 : eof_sent(false), tokpack(checked(tp))
00118         {}


Member Function Documentation

void lestes::lang::cplus::syn::pack_streamer::gc_mark ( void   )  [inline, protected, virtual]

Marks the keystone.

Marks all directly reachable parts of the class. The method must be overriden for each inherited class. It should contain abc.gc_mark() for each field abc of the inherited class and call to gc_mark() of the direct ancestor of the class. Does nothing for keystone, only stops processing of ancestors.

Reimplemented from lestes::std::mem::keystone.

Definition at line 119 of file manager.cc.

00120         {
00121                 tokpack.gc_mark();
00122                 streamer::gc_mark();
00123         }

static ptr<pack_streamer> lestes::lang::cplus::syn::pack_streamer::create ( ptr< bison_pack_token tp  )  [inline, static]

Definition at line 125 of file manager.cc.

Referenced by lestes::lang::cplus::syn::manager::spawn().

00126         {
00127                 return new pack_streamer(tp);
00128         }

virtual ptr<bison_token> lestes::lang::cplus::syn::pack_streamer::first (  )  [inline, virtual]

Implements lestes::lang::cplus::syn::streamer.

Definition at line 129 of file manager.cc.

00130         {
00131                 it = tokpack->pack_get()->begin();
00132                 return tokpack;
00133         }

virtual ptr<bison_token> lestes::lang::cplus::syn::pack_streamer::next (  )  [inline, virtual]

Implements lestes::lang::cplus::syn::streamer.

Definition at line 134 of file manager.cc.

References lassert2, and TOK_EOF.

00135         {
00136                 lassert2( !eof_sent, "Token requested, but EOF already sent." );
00137                 if (it != tokpack->pack_get()->end())
00138                         return *it++;
00139                 eof_sent = true;
00140                 lassert2( tokpack->end_location_get(),
00141                                 "The pack (token) does not have its end_location set." );
00142                 return bison_madeup_token::create( tokpack->end_location_get(), bison_token::TOK_EOF );
00143         }


Member Data Documentation

bool lestes::lang::cplus::syn::pack_streamer::eof_sent [private]

Definition at line 112 of file manager.cc.

srp<bison_pack_token> lestes::lang::cplus::syn::pack_streamer::tokpack [private]

Definition at line 113 of file manager.cc.

token_list_type::iterator lestes::lang::cplus::syn::pack_streamer::it [private]

Definition at line 114 of file manager.cc.


The documentation for this class was generated from the following file:
Generated on Mon Feb 12 18:25:38 2007 for lestes by doxygen 1.5.1-20070107