pfcrender  1.0.1
string_subst Class Reference

#include <stringsubst.h>

Public Member Functions

 string_subst (ulong nlev, ulong maxrlen=2048)
 
 ~string_subst ()
 
bool set_axiom (const char *ax)
 
bool set_rules (const char *rules[], ulong nr)
 
char current () const
 
bool next ()
 
bool first ()
 
void print_rules () const
 
void print_all () const
 
ulong num_rules () const
 
bool OK () const
 

Public Attributes

ulong nlev_
 
ucharaxiom_
 
ucharrules_
 
uchar ** lev_ptr_
 
ucharrule_start_ [256]
 
ulong maxrlen_
 
ucharend_rule_ptr_
 

Private Member Functions

 string_subst (const string_subst &)
 
string_substoperator= (const string_subst &)
 
void ctor_core (ulong nlev, ulong maxrlen)
 
bool add_rule (uchar c, const char *str)
 
bool add_rule (const char *c, const char *str)
 
char current (ulong lev) const
 
bool next (ulong lev)
 

Constructor & Destructor Documentation

string_subst::string_subst ( const string_subst )
private
string_subst::string_subst ( ulong  nlev,
ulong  maxrlen = 2048 
)
inlineexplicit

References ctor_core().

string_subst::~string_subst ( )
inline

References axiom_, lev_ptr_, and rules_.

Member Function Documentation

bool string_subst::add_rule ( uchar  c,
const char *  str 
)
private
bool string_subst::add_rule ( const char *  c,
const char *  str 
)
private
void string_subst::ctor_core ( ulong  nlev,
ulong  maxrlen 
)
inlineprivate
char string_subst::current ( ) const
inline

References lev_ptr_, and nlev_.

char string_subst::current ( ulong  lev) const
inlineprivate

References lev_ptr_.

bool string_subst::first ( )
inline

References axiom_, end_rule_ptr_, lev_ptr_, next(), nlev_, and OK().

bool string_subst::next ( ulong  lev)
inlineprivate

References lev_ptr_, next(), and rule_start_.

bool string_subst::next ( )
inline

References next(), and nlev_.

Referenced by first(), and next().

ulong string_subst::num_rules ( ) const
bool string_subst::OK ( ) const

Referenced by first().

string_subst& string_subst::operator= ( const string_subst )
private
void string_subst::print_all ( ) const
void string_subst::print_rules ( ) const
bool string_subst::set_axiom ( const char *  ax)
bool string_subst::set_rules ( const char *  rules[],
ulong  nr 
)

Member Data Documentation

uchar* string_subst::axiom_

Referenced by ctor_core(), first(), and ~string_subst().

uchar* string_subst::end_rule_ptr_

Referenced by ctor_core(), and first().

uchar** string_subst::lev_ptr_
ulong string_subst::maxrlen_

Referenced by ctor_core().

ulong string_subst::nlev_

Referenced by ctor_core(), current(), first(), and next().

uchar* string_subst::rule_start_[256]

Referenced by ctor_core(), and next().

uchar* string_subst::rules_

Referenced by ctor_core(), and ~string_subst().


The documentation for this class was generated from the following file: