Table Of Contents

Previous topic

SRelationClass Structure

Next topic

SUtterance Structure

SUtterance

An Utterance consists of a set of relations which in turn consists of a set of items.

Definitions

speect object SUtterance

Inheritance diagram of SObject.SUtterance

The SUtterance structure.

An Utterance consists of a set of SRelation which in turn consists of a set of SItem.

SUtterance Structure

speect class SUtteranceClass

Inheritance diagram of SObjectClass.SUtteranceClass

The SUtteranceClass structure.

SUtteranceClass Structure

Macros

macro S_UTTERANCE(SELF)

Return the given SUtterance child class object as a SUtterance object.

Parameters:
  • SELF

    The given object.

Return:

Given object as SUtterance* type.

Note:

This casting is not safety checked.

Functions

Initialization

void SUtteranceInit(SUtterance **self, const SVoice *voice, s_erc *error)

Initialize a newly created utterance for the given voice.

Parameters:
  • self

    The newly created utterance to initialize.

  • voice

    The voice associated with this utterance.

  • error

    Error code.

Note:

If this function fails the utterance will be deleted and the self pointer will be set to NULL.

Voice

const SVoice *SUtteranceVoice(const SUtterance *self, s_erc *error)

Get the voice that this utterance is associated with.

Parameters:
  • self

    The utterance.

  • error

    Error code.

Return:

Pointer to the voice.

Relations

SRelation *SUtteranceNewRelation(SUtterance *self, const char *name, s_erc *error)

Create a new named relation in given utterance.

Creates a relation, initializes it (SRelationInit), and sets it in the utterance (SUtteranceSetRelation).

Parameters:
  • self

    The utterance.

  • name

    The new relation’s name.

  • error

    Error code.

Return:

Pointer to newly created relation.

const SRelation *SUtteranceGetRelation(const SUtterance *self, const char *name, s_erc *error)

Return the named relation.

Parameters:
  • self

    The utterance.

  • name

    The name of the relation to return.

  • error

    Error code.

Return:

Pointer to named relation.

void SUtteranceSetRelation(SUtterance *self, SRelation *rel, s_erc *error)

Set the named relation in the given utterance.

Parameters:
  • self

    The utterance.

  • rel

    The relation to set in the utterance.

  • error

    Error code.

Note:

The relation must have a name, and will be set in the utterance with this name. If a relation with the same name already exists in the utterance then it will be deleted.

void SUtteranceDelRelation(SUtterance *self, const char *name, s_erc *error)

Delete the named relation.

Parameters:
  • self

    The utterance.

  • name

    The name of the relation to delete.

  • error

    Error code.

s_bool SUtteranceRelationIsPresent(const SUtterance *self, const char *name, s_erc *error)

Query the presence of a named relation.

Parameters:
  • self

    The utterance.

  • name

    The name of the relation.

  • error

    Error code.

Return:

TRUE if found, else FALSE.

SList *SUtteranceRelationsKeys(const SUtterance *self, s_erc *error)

Get the keys of the relations of the given utterance.

Parameters:
  • self

    The given utterance.

  • error

    Error code.

Return:

Pointer to a SList containing the keys of the relations of the utterance. The list objects (keys) are string objects and are accessed with SObjectGetString.

Note:

Caller is responsible for the memory of the returned SList object.

Features

const SObject *SUtteranceGetFeature(const SUtterance *self, const char *name, s_erc *error)

Get the named feature from the given utterance.

Parameters:
  • self

    The utterance.

  • name

    The feature name.

  • error

    Error code.

Return:

Pointer to SObject object feature value.

void SUtteranceSetFeature(SUtterance *self, const char *name, const SObject *object, s_erc *error)

Set the named feature for the given utterance.

Parameters:
  • self

    The given utterance.

  • name

    The feature name (key).

  • object

    The feature object (value).

  • error

    Error code.

void SUtteranceDelFeature(SUtterance *self, const char *name, s_erc *error)

Delete the named feature for the given utterance.

Parameters:
  • self

    The given utterance.

  • name

    The feature name (key).

  • error

    Error code.

s_bool SUtteranceFeatureIsPresent(const SUtterance *self, const char *name, s_erc *error)

Query if named feature is present in the given utterance.

Parameters:
  • self

    The given utterance.

  • name

    The feature name.

  • error

    Error code.

Return:

TRUE if present or FALSE if not.

SList *SUtteranceFeatKeys(const SUtterance *self, s_erc *error)

Get the keys of the features of the given utterance.

Parameters:
  • self

    The given utterance.

  • error

    Error code.

Return:

Pointer to a SList containing the keys of the features of the utterance. The list objects (keys) are string objects and are accessed with SObjectGetString.

Note:

Caller is responsible for the memory of the returned SList object.