KJB
|
Class representing semantic nodes at the leaves of trees. More...
#include <Semantic_elaboration.h>
Public Types | |
typedef Semantic_elaboration::Self_ptr | Base_ptr |
typedef Traits | Traits_t |
typedef boost::shared_ptr < Semantic_data< T > > | Data_ptr |
Public Types inherited from semantics::Semantic_elaboration | |
typedef Semantic_data_base::Key_type | Key_type |
typedef Semantic_data_base::Val_type | Val_type |
typedef Semantic_data_base::Hash_pair | Hash_pair |
typedef boost::shared_ptr < Semantic_elaboration > | Self_ptr |
typedef boost::shared_ptr < const Semantic_elaboration > | Self_ptr_const |
typedef std::deque < Self_ptr_const > | Self_ptrs_read |
typedef Semantic_data_base::Base_ptr | Data_base_ptr |
typedef boost::tuple < Self_ptr_const, Semantic_data_base::Hash_pair > | Step_result |
typedef int | Referent_code |
typedef std::vector < Referent_code > | Referent_list |
Public Member Functions | |
Terminal_elaboration () | |
construct with null head value More... | |
Terminal_elaboration (const Val_type &head) | |
construct from numeric code for head value More... | |
Terminal_elaboration (const Key_type &head) | |
construct from string for head category More... | |
const Val_type & | head () const |
return code for head value More... | |
const Key_type & | head_s () const |
return code for head value More... | |
const Val_type & | arg (const size_t &) const |
return underlying hash code for head value More... | |
const Key_type & | arg_s (const size_t &) const |
return underlying hash code for head value More... | |
const size_t & | head_code () const |
return underlying hash code for head value More... | |
const size_t & | args_code () const |
return underlying hash code for args More... | |
size_t | type_code () const |
return type code More... | |
const Data_base_ptr | data () const |
return pointer to underlying data node More... | |
const Step_code::Weights & | step_filter () const |
return binary filter array indicating allowable steps More... | |
Base_ptr | child (const size_t &) const |
return pointer to child in a particular position More... | |
Self_ptrs_read | children () const |
return pointer to child in a particular position More... | |
Step_result | take_a_step (const Step_code_t &step_code) const |
take a step down the semantic tree of type step_code More... | |
void | add_child (const size_t &, const Self_ptr) |
put a child in a particular position More... | |
void | insert_child (const size_t &, const Self_ptr, const size_t &) |
add child and have existing child "adopt" the old one More... | |
bool | is_terminal () const |
is this a terminal node? More... | |
void | print (std::ostream &os) const |
print contents at this node More... | |
void | print_subtree (std::ostream &os, int indent_level) const |
recursively print elaboration tree contents More... | |
Public Member Functions inherited from semantics::Semantic_elaboration | |
virtual | ~Semantic_elaboration () |
virtual const Referent_code & | head_referent () const |
get the integral code for the referent (if it exists) More... | |
virtual const Referent_code & | arg_referent (const size_t &) const |
get the integral code for the arg in position pos (if it exists) More... | |
Additional Inherited Members | |
Static Public Attributes inherited from semantics::Semantic_elaboration | |
static const Referent_code | NULL_REFERENT = -1 |
Class representing semantic nodes at the leaves of trees.
Class representing semantic nodes not at the leaves of trees.
typedef Semantic_elaboration::Self_ptr semantics::Terminal_elaboration< T, Traits >::Base_ptr |
typedef boost::shared_ptr<Semantic_data<T> > semantics::Terminal_elaboration< T, Traits >::Data_ptr |
typedef Traits semantics::Terminal_elaboration< T, Traits >::Traits_t |
semantics::Terminal_elaboration< T, Traits >::Terminal_elaboration | ( | ) |
construct with null head value
semantics::Terminal_elaboration< T, Traits >::Terminal_elaboration | ( | const Val_type & | head | ) |
construct from numeric code for head value
semantics::Terminal_elaboration< T, Traits >::Terminal_elaboration | ( | const Key_type & | head | ) |
construct from string for head category
|
inlinevirtual |
put a child in a particular position
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return underlying hash code for head value
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return underlying hash code for head value
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return underlying hash code for args
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return pointer to child in a particular position
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return pointer to child in a particular position
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return pointer to underlying data node
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return code for head value
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return underlying hash code for head value
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return code for head value
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
add child and have existing child "adopt" the old one
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
is this a terminal node?
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
print contents at this node
Implements semantics::Semantic_elaboration.
|
virtual |
recursively print elaboration tree contents
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return binary filter array indicating allowable steps
Implements semantics::Semantic_elaboration.
|
virtual |
take a step down the semantic tree of type step_code
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return type code
Implements semantics::Semantic_elaboration.