Loading...
Searching...
No Matches
EST_Item Class Reference

`#include <include/ling_class/EST_Item.h>`

## Public Member Functions

Constructor Functions
| EST_Item ()
| Default constructor.
| EST_Item (const EST_Item &item)
| Copy constructor only makes reference to contents.
| EST_Item (EST_Relation *rel)
| Includes reference to relation.
| EST_Item (EST_Relation *rel, EST_Item *si)
| Most common form of construction.
| ~EST_Item ()
| Deletes it and references to it in its contents.
Feature access functions.
These functions are wrap-around functions to the basic access functions in the \Ref{EST_Features} class. In all these functions, if the optional argument <parameter>m} is set to 1, an error is thrown if the feature does not exist
const float | F (const EST_String &name) const
const float | F (const EST_String &name, float def) const
const EST_String | S (const EST_String &name) const
const EST_String | S (const EST_String &name, const EST_String &def) const
const int | I (const EST_String &name) const
const int | I (const EST_String &name, int def) const
EST_Features & | A (const EST_String &name) const
EST_Features & | A (const EST_String &name, EST_Features &def) const
Feature setting functions.
A separate function is provided for each permissible value type
void | set (const EST_String &name, int ival)
void | set (const EST_String &name, float fval)
void | set (const EST_String &name, double fval)
void | set (const EST_String &name, const EST_String &sval)
void | set (const EST_String &name, const char *cval)
void | set_function (const EST_String &name, const EST_String &funcname)
void | set (const EST_String &name, EST_Features &f)
void | set_val (const EST_String &name, const EST_Val &sval)
Utility feature functions
void | f_remove (const EST_String &name)
void | evaluate_features ()
int | f_present (const EST_String &name) const
int | length () const
EST_Item_Content * | contents () const
void | set_contents (EST_Item_Content *li)
const EST_String | name () const
void | set_name (const EST_String &name) const
EST_Features & | features () const
const EST_Val | f (const EST_String &name) const
const EST_Val | f (const EST_String &name, const EST_Val &def) const

## Static Protected Member Functions

static void | class_init (void)

## Cross relational access

class | EST_Relation
class | ling_class_init
EST_Item * | inext (const EST_Item *i)
EST_Item * | iprev (const EST_Item *i)
EST_Item * | idown (const EST_Item *i)
EST_Item * | iup (const EST_Item *i)
int | i_same_item (const EST_Item *l1, const EST_Item *l2)
int | move_item (EST_Item *from, EST_Item *to)
int | merge_item (EST_Item *from, EST_Item *to)
int | move_sub_tree (EST_Item *from, EST_Item *to)
int | exchange_sub_trees (EST_Item *from, EST_Item *to)
ostream & | operator<< (ostream &s, const EST_Item &a)
bool | operator!= (const EST_Item &a, const EST_Item &b)
bool | operator== (const EST_Item &a, const EST_Item &b)
EST_Item * | as_relation (const char *relname) const
| View item from another relation (const char *) method.
int | in_relation (const EST_String &relname) const
| TRUE if this item is in named relation.
EST_TKVL< EST_String, EST_Val > & | relations ()
| Access to the relation links.
const EST_String & | relation_name () const
| The relation name of this particular item.
EST_Relation * | relation (void) const
| The relation of this particular item.
int | same_item (const EST_Item *li) const
| True if li is the same item ignoring its relation viewpoint.
EST_Item * | insert_after (EST_Item *li=0)
EST_Item * | insert_before (EST_Item *li=0)
EST_Item * | insert_below (EST_Item *li=0)
EST_Item * | insert_above (EST_Item *li=0)
EST_Item * | append_daughter (EST_Item *li=0)
EST_Item * | prepend_daughter (EST_Item *li=0)
EST_Item * | insert_parent (EST_Item *li=0)
void | unref_all ()
int | verify () const
EST_Item & | operator= (const EST_Item &s)
static void | splice (EST_Item *a, EST_Item *b)

## Detailed Description

A class for containing individual linguistic objects such as words or phones.

These contain two types of information. This first is specific to the \Ref{EST_Relation} we are viewing this ling item from, the second part consists of a set of features. These features may be shared by instances of this ling item in different <link linkend="est-relation">EST_Relation</link> within the same <link linkend="est-utterance">EST_Utterances</link>

The shared part of an <link linkend="est-item">EST_Item</link> is represented by the class EST_Item_Content. It should not normally be accessed by the general users as reverse links from the contents to each of the EST_Items it is part of are held ensure the integrity of the structures. Changing these without maintain the appropriate links is unlikely to be stable.

We believe this structure is the most efficient for the most natural use we envisage. Traversal of the items ....

Definition at line 82 of file EST_Item.h.

## Constructor & Destructor Documentation

## EST_Item() [1/4]

EST_Item::EST_Item | ( |  | ) |

Default constructor.

Definition at line 81 of file EST_Item.cc.

## EST_Item() [2/4]

EST_Item::EST_Item | ( | const EST_Item & | item | ) |

Copy constructor only makes reference to contents.

Definition at line 103 of file EST_Item.cc.

## EST_Item() [3/4]

EST_Item::EST_Item | ( | EST_Relation * | rel | ) |

Includes reference to relation.

Definition at line 142 of file EST_Item.cc.

## EST_Item() [4/4]

EST_Item::EST_Item | ( | EST_Relation * | rel,
|  | EST_Item * | si )

Most common form of construction.

Definition at line 162 of file EST_Item.cc.

## ~EST_Item()

EST_Item::~EST_Item | ( |  | ) |

Deletes it and references to it in its contents.

Definition at line 108 of file EST_Item.cc.

## Member Function Documentation

## class_init()

void EST_Item::class_init | ( | void |  | ) |

static protected

Definition at line 66 of file EST_Item.cc.

## F() [1/2]

const float EST_Item::F | ( | const EST_String & | name | ) | const

inline

return the value of the feature <parameter>name</parameter> cast as a float

Definition at line 134 of file EST_Item.h.

## F() [2/2]

const float EST_Item::F | ( | const EST_String & | name,
|  | float | def ) const

inline

return the value of the feature <parameter>name</parameter> cast as a float, returning <parameter>def</parameter> if not found.

Definition at line 138 of file EST_Item.h.

## S() [1/2]

const EST_String EST_Item::S | ( | const EST_String & | name | ) | const

inline

return the value of the feature <parameter>name</parameter> cast as a EST_String

Definition at line 143 of file EST_Item.h.

## S() [2/2]

const EST_String EST_Item::S | ( | const EST_String & | name,
|  | const EST_String & | def ) const

inline

return the value of the feature <parameter>name</parameter> cast as a EST_String, returning <parameter>def</parameter> if not found.

Definition at line 149 of file EST_Item.h.

## I() [1/2]

const int EST_Item::I | ( | const EST_String & | name | ) | const

inline

return the value of the feature <parameter>name</parameter> cast as a int

Definition at line 154 of file EST_Item.h.

## I() [2/2]

const int EST_Item::I | ( | const EST_String & | name,
|  | int | def ) const

inline

return the value of the feature <parameter>name</parameter> cast as a int returning <parameter>def</parameter> if not found.

Definition at line 158 of file EST_Item.h.

## A() [1/2]

EST_Features & EST_Item::A | ( | const EST_String & | name | ) | const

inline

return the value of the feature <parameter>name</parameter> cast as a EST_Features

Definition at line 163 of file EST_Item.h.

## A() [2/2]

EST_Features & EST_Item::A | ( | const EST_String & | name,
|  | EST_Features & | def ) const

inline

return the value of the feature <parameter>name</parameter> cast as a EST_Features, returning <parameter>def</parameter> if not found.

Definition at line 169 of file EST_Item.h.

## set() [1/6]

void EST_Item::set | ( | const EST_String & | name,
|  | int | ival )

inline

set feature <parameter>name</parameter> to <parameter>val</parameter>

Definition at line 179 of file EST_Item.h.

## set() [2/6]

void EST_Item::set | ( | const EST_String & | name,
|  | float | fval )

inline

set feature <parameter>name</parameter> to <parameter>val</parameter>

Definition at line 183 of file EST_Item.h.

## set() [3/6]

void EST_Item::set | ( | const EST_String & | name,
|  | double | fval )

inline

set feature <parameter>name</parameter> to <parameter>val</parameter>

Definition at line 187 of file EST_Item.h.

## set() [4/6]

void EST_Item::set | ( | const EST_String & | name,
|  | const EST_String & | sval )

inline

set feature <parameter>name</parameter> to <parameter>val</parameter>

Definition at line 191 of file EST_Item.h.

## set() [5/6]

void EST_Item::set | ( | const EST_String & | name,
|  | const char * | cval )

inline

set feature <parameter>name</parameter> to <parameter>val</parameter>

Definition at line 195 of file EST_Item.h.

## set_function()

void EST_Item::set_function | ( | const EST_String & | name,
|  | const EST_String & | funcname )

inline

set feature <parameter>name</parameter> to <parameter>val</parameter>, a function registered in the feature function list.

Definition at line 201 of file EST_Item.h.

## set() [6/6]

void EST_Item::set | ( | const EST_String & | name,
|  | EST_Features & | f )

inline

set feature <parameter>name</parameter> to <parameter>f</parameter>, a set of features, which is copied into the object.

Definition at line 207 of file EST_Item.h.

## set_val()

void EST_Item::set_val | ( | const EST_String & | name,
|  | const EST_Val & | sval )

inline

set feature <parameter>name</parameter> to <parameter>f</parameter>, whose type is EST_Val.

Definition at line 214 of file EST_Item.h.

## f_remove()

void EST_Item::f_remove | ( | const EST_String & | name | ) |

inline

remove feature <parameter>name</parameter>

Definition at line 222 of file EST_Item.h.

## evaluate_features()

void EST_Item::evaluate_features | ( |  | ) |

find all the attributes whose values are functions, and replace them with their evaluation.

Definition at line 175 of file EST_Item.cc.

## f_present()

int EST_Item::f_present | ( | const EST_String & | name | ) | const

inline

TRUE if feature is present, FALSE otherwise

Definition at line 230 of file EST_Item.h.

## length()

int EST_Item::length | ( |  | ) | const

Definition at line 231 of file EST_Item.cc.

## contents()

EST_Item_Content * EST_Item::contents | ( |  | ) | const

inline

Definition at line 242 of file EST_Item.h.

## set_contents()

void EST_Item::set_contents | ( | EST_Item_Content * | li | ) |

Definition at line 205 of file EST_Item.cc.

## name()

const EST_String EST_Item::name | ( |  | ) | const

inline

Definition at line 248 of file EST_Item.h.

## set_name()

void EST_Item::set_name | ( | const EST_String & | name | ) | const

inline

Definition at line 252 of file EST_Item.h.

## features()

EST_Features & EST_Item::features | ( |  | ) | const

inline

Definition at line 256 of file EST_Item.h.

## f() [1/2]

const EST_Val EST_Item::f | ( | const EST_String & | name | ) | const

inline

Definition at line 258 of file EST_Item.h.

## f() [2/2]

const EST_Val EST_Item::f | ( | const EST_String & | name,
|  | const EST_Val & | def ) const

inline

Definition at line 287 of file EST_Item.h.

## as_relation()

EST_Item * EST_Item::as_relation | ( | const char * | relname | ) | const

inline

View item from another relation (const char *) method.

Definition at line 302 of file EST_Item.h.

## in_relation()

int EST_Item::in_relation | ( | const EST_String & | relname | ) | const

inline

TRUE if this item is in named relation.

Definition at line 306 of file EST_Item.h.

## relations()

EST_TKVL< EST_String, EST_Val > & EST_Item::relations | ( |  | ) |

inline

Access to the relation links.

Definition at line 310 of file EST_Item.h.

## relation_name()

const EST_String & EST_Item::relation_name | ( |  | ) | const

The relation name of this particular item.

Definition at line 199 of file EST_Item.cc.

## relation()

EST_Relation * EST_Item::relation | ( | void |  | ) | const

inline

The relation of this particular item.

Definition at line 316 of file EST_Item.h.

## same_item()

int EST_Item::same_item | ( | const EST_Item * | li | ) | const

inline

True if li is the same item ignoring its relation viewpoint.

Definition at line 320 of file EST_Item.h.

## splice()

void EST_Item::splice | ( | EST_Item * | a,
|  | EST_Item * | b )

inline static

Definition at line 329 of file EST_Item.h.

## insert_after()

EST_Item * EST_Item::insert_after | ( | EST_Item * | li = 0 | ) |

Definition at line 239 of file EST_Item.cc.

## insert_before()

EST_Item * EST_Item::insert_before | ( | EST_Item * | li = 0 | ) |

Definition at line 258 of file EST_Item.cc.

## insert_below()

EST_Item * EST_Item::insert_below | ( | EST_Item * | li = 0 | ) |

Definition at line 283 of file EST_Item.cc.

## insert_above()

EST_Item * EST_Item::insert_above | ( | EST_Item * | li = 0 | ) |

Definition at line 297 of file EST_Item.cc.

## append_daughter()

EST_Item * EST_Item::append_daughter | ( | EST_Item * | li = 0 | ) |

Definition at line 451 of file EST_Item.cc.

## prepend_daughter()

EST_Item * EST_Item::prepend_daughter | ( | EST_Item * | li = 0 | ) |

Definition at line 490 of file EST_Item.cc.

## insert_parent()

EST_Item * EST_Item::insert_parent | ( | EST_Item * | li = 0 | ) |

Definition at line 316 of file EST_Item.cc.

## unref_all()

void EST_Item::unref_all | ( |  | ) |

Definition at line 192 of file EST_Item.cc.

## verify()

int EST_Item::verify | ( |  | ) | const

Definition at line 583 of file EST_Item.cc.

## operator=()

EST_Item & EST_Item::operator= | ( | const EST_Item & | s | ) |

Definition at line 630 of file EST_Item.cc.

## Friends And Related Symbol Documentation

## EST_Relation

friend class EST_Relation

friend

Definition at line 376 of file EST_Item.h.

## ling_class_init

friend class ling_class_init

friend

Definition at line 377 of file EST_Item.h.

## inext

EST_Item * inext | ( | const EST_Item * | i | ) |

friend

Definition at line 330 of file EST_Item.cc.

## iprev

EST_Item * iprev | ( | const EST_Item * | i | ) |

friend

Definition at line 338 of file EST_Item.cc.

## idown

EST_Item * idown | ( | const EST_Item * | i | ) |

friend

Definition at line 346 of file EST_Item.cc.

## iup

EST_Item * iup | ( | const EST_Item * | i | ) |

friend

Definition at line 354 of file EST_Item.cc.

## i_same_item

int i_same_item | ( | const EST_Item * | l1,
|  | const EST_Item * | l2 )

friend

Definition at line 380 of file EST_Item.h.

## move_item

int move_item | ( | EST_Item * | from,
|  | EST_Item * | to )

friend

Definition at line 115 of file item_aux.cc.

## merge_item

int merge_item | ( | EST_Item * | from,
|  | EST_Item * | to )

friend

Definition at line 85 of file item_aux.cc.

## move_sub_tree

int move_sub_tree | ( | EST_Item * | from,
|  | EST_Item * | to )

friend

Definition at line 128 of file item_aux.cc.

## exchange_sub_trees

int exchange_sub_trees | ( | EST_Item * | from,
|  | EST_Item * | to )

friend

Definition at line 158 of file item_aux.cc.

## operator<<

ostream & operator<< | ( | ostream & | s,
|  | const EST_Item & | a )

friend

Definition at line 636 of file EST_Item.cc.

## operator!=

bool operator!= | ( | const EST_Item & | a,
|  | const EST_Item & | b )

friend

Definition at line 371 of file EST_Item.h.

## operator==

bool operator== | ( | const EST_Item & | a,
|  | const EST_Item & | b )

friend

Definition at line 373 of file EST_Item.h.

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

- include/ling_class/EST_Item.h
- ling_class/EST_Item.cc