KJB
|
#include <Semantic_elaboration.h>
Public Member Functions | |
Nonterminal_elaboration (const Val_type &head, const Arg_list &args, const Referent_list &referent_list=Referent_list(Traits::n_args+1, NULL_REFERENT)) | |
construct an elaboration from numeric codes for head and args More... | |
Nonterminal_elaboration (const Key_type &head, const Arg_list_s &args, const Referent_list &referent_list=Referent_list(Traits::n_args+1, NULL_REFERENT)) | |
construct an elaboration from strings 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 &pos) const |
return underlying hash code for head value More... | |
const Key_type & | arg_s (const size_t &pos) const |
return 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 data node More... | |
const Arg_list & | args () const |
return args (pass-through to data_) More... | |
Base_ptr | child (const size_t &index) const |
get pointer to child elaboration in position "index" More... | |
Self_ptrs_read | children () const |
access the container of children by const reference More... | |
const Referent_code & | head_referent () const |
get the integral code for the referent (if it exists) More... | |
const Referent_code & | arg_referent (const size_t &pos) const |
get the integral code for the arg in position pos (if it exists) More... | |
const Step_code::Weights & | step_filter () const |
return binary filter array indicating allowable steps More... | |
Step_result | take_a_step (const Step_code_t &step_code) const |
takes a step down the semantic tree, returning data More... | |
void | set_data_args (const Arg_list &args) |
set new argument values for underyling data More... | |
void | add_child (const size_t &pos, const Base_ptr child) |
add a new elaboration of argument "index", discarding any existing More... | |
void | insert_child (const size_t &pos, const Base_ptr new_child, const size_t &pos_for_old) |
add child and have it adopt existing one More... | |
bool | is_terminal () const |
query whether this elaboration is a terminal or not More... | |
void | print (std::ostream &os) const |
print contents at this node to ostream os More... | |
void | print_subtree (std::ostream &os, int indent_level=0) const |
recursively print the full elaboration tree More... | |
Public Member Functions inherited from semantics::Semantic_elaboration | |
virtual | ~Semantic_elaboration () |
Additional Inherited Members | |
Static Public Attributes inherited from semantics::Semantic_elaboration | |
static const Referent_code | NULL_REFERENT = -1 |
typedef Data_type::Arg_list semantics::Nonterminal_elaboration< T, Traits >::Arg_list |
typedef Data_type::Arg_list_s semantics::Nonterminal_elaboration< T, Traits >::Arg_list_s |
typedef Semantic_elaboration::Self_ptr semantics::Nonterminal_elaboration< T, Traits >::Base_ptr |
typedef Semantic_elaboration::Self_ptr_const semantics::Nonterminal_elaboration< T, Traits >::Base_ptr_const |
typedef boost::array<Base_ptr, Traits::n_args> semantics::Nonterminal_elaboration< T, Traits >::Child_array |
typedef boost::shared_ptr<Semantic_data<T> > semantics::Nonterminal_elaboration< T, Traits >::Data_ptr |
typedef Semantic_data<T> semantics::Nonterminal_elaboration< T, Traits >::Data_type |
typedef Nonterminal_elaboration<T, Traits> semantics::Nonterminal_elaboration< T, Traits >::Self_type |
typedef Traits semantics::Nonterminal_elaboration< T, Traits >::Traits_t |
semantics::Nonterminal_elaboration< T, Traits >::Nonterminal_elaboration | ( | const Val_type & | head, |
const Arg_list & | args, | ||
const Referent_list & | referent_list = Referent_list(Traits::n_args + 1, NULL_REFERENT) |
||
) |
construct an elaboration from numeric codes for head and args
head | integral code for the value of the head (relation or object) |
args | array of integral codes for the arguments of the predicate |
referent_code | integral code of a referent corresponding to the head (if it exists). |
semantics::Nonterminal_elaboration< T, Traits >::Nonterminal_elaboration | ( | const Key_type & | head, |
const Arg_list_s & | args, | ||
const Referent_list & | referent_list = Referent_list(Traits::n_args + 1, NULL_REFERENT) |
||
) |
construct an elaboration from strings
head | label (string) for the value of the head |
args | array of labels for the arguments of the predicate |
referent_code | integral code of a referent corresponding to the head (if it exists). |
|
virtual |
add a new elaboration of argument "index", discarding any existing
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return underlying hash code for head value
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
get the integral code for the arg in position pos (if it exists)
Reimplemented from semantics::Semantic_elaboration.
|
inlinevirtual |
return code for head value
Implements semantics::Semantic_elaboration.
|
inline |
return args (pass-through to data_)
|
inlinevirtual |
return underlying hash code for args
Implements semantics::Semantic_elaboration.
|
virtual |
get pointer to child elaboration in position "index"
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
access the container of children by const reference
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return pointer to 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 |
get the integral code for the referent (if it exists)
Reimplemented from semantics::Semantic_elaboration.
|
inlinevirtual |
return code for head value
Implements semantics::Semantic_elaboration.
|
virtual |
add child and have it adopt existing one
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
query whether this elaboration is a terminal or not
true
if a terminal, false
otherwise Implements semantics::Semantic_elaboration.
|
inlinevirtual |
print contents at this node to ostream os
Implements semantics::Semantic_elaboration.
|
virtual |
recursively print the full elaboration tree
Implements semantics::Semantic_elaboration.
void semantics::Nonterminal_elaboration< T, Traits >::set_data_args | ( | const Arg_list & | args | ) |
set new argument values for underyling data
args | a boost::tuple of numeric codes specifying the args |
|
inlinevirtual |
return binary filter array indicating allowable steps
Implements semantics::Semantic_elaboration.
|
virtual |
takes a step down the semantic tree, returning data
step_code | an enumeration code indicating the type of step to take |
Implements semantics::Semantic_elaboration.
|
inlinevirtual |
return type code
Implements semantics::Semantic_elaboration.