KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
semantics::Elaboration_tree Class Reference

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_ptrObj_queue
 
typedef std::deque< Elab_ptrObj_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
 

Detailed Description

the main "Semantic tree" object

Represents a conceptual description underlying a caption.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Parameters
subjectstring 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

Member Function Documentation

Elaboration_tree::Elab_ptr_const semantics::Elaboration_tree::elaborate_color ( const Key_type color)

add a color elaboration to the object currently in focus

Parameters
colora 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

Parameters
sizea 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

Parameters
relationa 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_classa 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.
void semantics::Elaboration_tree::null_elaboration ( )
inline

finish elaborating current object and move focus to next one

Remarks
Upon selection of a "null elaboration", the current object is assumed to be fully described, and the next one in the queue becomes active.
void semantics::Elaboration_tree::print ( std::ostream &  os) const
inline

print the entire elaboration tree to ostream os

Parameters
osa standard output stream where the tree is to be printed
Elab_ptr_const semantics::Elaboration_tree::root ( ) const
inline

get a shared pointer to the root elaboration node

Elaboration_tree::Step_result semantics::Elaboration_tree::take_a_step ( const Elab_ptr_const  curr,
const Step_code_t step_code 
)
static

step down the tree using enumerated step type Step_code_t

Parameters
currpointer to the node being stepped from
step_codeenumerated code defining step type
Returns
tuple containing (1) pointer to new node, (2) hash code for head value of new node (3) hash code for args of new node

Member Data Documentation

const size_t semantics::Elaboration_tree::BASE = Binary_elaboration::Traits_t::BASE
static
const size_t semantics::Elaboration_tree::COLOR = Object_elaboration::Traits_t::COLOR
static
const size_t semantics::Elaboration_tree::SIZE = Object_elaboration::Traits_t::SIZE
static
const size_t semantics::Elaboration_tree::TARGET = Binary_elaboration::Traits_t::TARGET
static

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