KJB
|
the main "Semantic tree" object More...
#include <Elaboration_tree.h>
Public Types | |
typedef boost::shared_ptr < Elaboration_tree > | Self_ptr |
typedef Semantic_data_base::Val_type | Val_type |
typedef Semantic_data_base::Key_type | Key_type |
typedef Semantic_data_base::Hash_pair | Hash_pair |
typedef Semantic_elaboration::Self_ptr | Elab_ptr |
typedef Semantic_elaboration::Self_ptr_const | Elab_ptr_const |
typedef boost::shared_ptr < Object_elaboration > | Obj_ptr |
typedef boost::shared_ptr < Binary_elaboration > | Binary_ptr |
typedef boost::shared_ptr < Unary_elaboration > | Unary_ptr |
typedef std::deque< Obj_ptr > | Obj_queue |
typedef std::deque< Elab_ptr > | Obj_parent_queue |
typedef Semantic_elaboration::Step_result | Step_result |
Public Member Functions | |
Elaboration_tree (const Key_type &subject, const Semantic_elaboration::Referent_code &subject_referent=Semantic_elaboration::NULL_REFERENT) | |
construct a new elaboration tree given an object as focus More... | |
Elab_ptr_const | root () const |
get a shared pointer to the root elaboration node More... | |
Elab_ptr_const | elaborate_color (const Key_type &color) |
add a color elaboration to the object currently in focus More... | |
Elab_ptr_const | elaborate_size (const Key_type &size) |
add a size elaboration to the object currently in focus More... | |
Elab_ptr_const | elaborate_with_relation (const Key_type &relation, const Key_type &base_object_class, const Semantic_elaboration::Referent_code &base_referent_code=Semantic_elaboration::NULL_REFERENT) |
elaborate description of object in focus via spatial relation More... | |
void | null_elaboration () |
finish elaborating current object and move focus to next one More... | |
void | print (std::ostream &os) const |
print the entire elaboration tree to ostream os More... | |
Static Public Member Functions | |
static Step_result | take_a_step (const Elab_ptr_const curr, const Step_code_t &step_code) |
step down the tree using enumerated step type Step_code_t More... | |
Static Public Attributes | |
static const size_t | TARGET = Binary_elaboration::Traits_t::TARGET |
static const size_t | BASE = Binary_elaboration::Traits_t::BASE |
static const size_t | COLOR = Object_elaboration::Traits_t::COLOR |
static const size_t | SIZE = Object_elaboration::Traits_t::SIZE |
the main "Semantic tree" object
Represents a conceptual description underlying a caption.
typedef boost::shared_ptr<Binary_elaboration> semantics::Elaboration_tree::Binary_ptr |
typedef std::deque<Elab_ptr> semantics::Elaboration_tree::Obj_parent_queue |
typedef boost::shared_ptr<Object_elaboration> semantics::Elaboration_tree::Obj_ptr |
typedef std::deque<Obj_ptr> semantics::Elaboration_tree::Obj_queue |
typedef boost::shared_ptr<Elaboration_tree> semantics::Elaboration_tree::Self_ptr |
typedef boost::shared_ptr<Unary_elaboration> semantics::Elaboration_tree::Unary_ptr |
semantics::Elaboration_tree::Elaboration_tree | ( | const Key_type & | subject, |
const Semantic_elaboration::Referent_code & | subject_referent = Semantic_elaboration::NULL_REFERENT |
||
) |
construct a new elaboration tree given an object as focus
subject | string indicating the main target object of the description. Referenced against a lookup table; if not known, the target object is represented as a generic 'unknown' object |
Elaboration_tree::Elab_ptr_const semantics::Elaboration_tree::elaborate_color | ( | const Key_type & | color | ) |
add a color elaboration to the object currently in focus
color | a string indicating the color used to describe the current focal object. If not contained in the color database, it is stored as a universal 'unknown' color. |
Elaboration_tree::Elab_ptr_const semantics::Elaboration_tree::elaborate_size | ( | const Key_type & | size | ) |
add a size elaboration to the object currently in focus
size | a string indicating the size used to describe the current focal object. If not contained in the size database, it is stored as a universal 'unknown' size. |
Elaboration_tree::Elab_ptr_const semantics::Elaboration_tree::elaborate_with_relation | ( | const Key_type & | relation, |
const Key_type & | base_object_class, | ||
const Semantic_elaboration::Referent_code & | base_referent_code = Semantic_elaboration::NULL_REFERENT |
||
) |
elaborate description of object in focus via spatial relation
relation | a string representing a binary relation to be used to describe the current focal object. If not contained in the database of binary relations, it is stored as a generic 'unknown' |
base_object_class | a string naming the second argument, called the 'base', of the binary relation. If not contained in the object database, it is stored as a generic 'unknown' object. |
|
inline |
finish elaborating current object and move focus to next one
|
inline |
print the entire elaboration tree to ostream os
os | a standard output stream where the tree is to be printed |
|
inline |
get a shared pointer to the root elaboration node
|
static |
step down the tree using enumerated step type Step_code_t
curr | pointer to the node being stepped from |
step_code | enumerated code defining step type |
|
static |
|
static |
|
static |
|
static |