Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

ffword.h File Reference

Declares the ffword data type (a string with metadata) and some functions to manipulate its instances. More...

#include "fftypes.h"
#include "ffstring.h"
#include "ffops.h"

Go to the source code of this file.

Typedefs

typedef ffword ffword
 Bundles together a word and its metadata.

Functions

ffint32 ffword_create (const ffchar *source, ffword *target)
 Create an ffword from a C style string.
ffint32 ffword_copy (ffword *source, ffword *target)
 Create a copy of an ffword.
ffint32 ffword_delete (ffword *target)
 Deletes an ffword.
ffint32 ffword_move (ffword *source, ffword *target)
 Replaces the data of target with the data of source and then deletes the source.
ffint32 ffword_finalize (ffword *target)
 Delete an ffword without deallocating the real string data of the str member.
ffint32 ffword_swap_delete (ffword *source, ffword *target)


Detailed Description

Declares the ffword data type (a string with metadata) and some functions to manipulate its instances.

They are implemented in ffword.c.

Definition in file ffword.h.


Typedef Documentation

typedef struct ffword ffword
 

Bundles together a word and its metadata.


Function Documentation

ffint32 ffword_copy ffword source,
ffword target
 

Create a copy of an ffword.

Parameters:
source The source ffword
target The target ffword
Returns:
0 on success; negative on error

Definition at line 46 of file ffword.c.

References ffstring_copy().

Referenced by ffpriv_genitive_plural(), and ffpriv_partitive_stem().

ffint32 ffword_create const ffchar source,
ffword target
 

Create an ffword from a C style string.

Parameters:
source The source C-style string
target The target user-allocated ffword
Returns:
0 on success; negative on error

Definition at line 35 of file ffword.c.

References ffstring_create().

Referenced by ff_abessive_plural(), ff_abessive_singular(), ff_ablative_plural(), ff_ablative_singular(), ff_adessive_plural(), ff_adessive_singular(), ff_allative_plural(), ff_allative_singular(), ff_comitative_plural(), ff_elative_plural(), ff_elative_singular(), ff_essive_plural(), ff_essive_singular(), ff_genitive_plural(), ff_genitive_singular(), ff_illative_plural(), ff_illative_singular(), ff_inessive_plural(), ff_inessive_singular(), ff_instructive_plural(), ff_instructive_singular(), ff_nominative_plural(), ff_partitive_plural(), ff_partitive_singular(), ff_translative_plural(), and ff_translative_singular().

ffint32 ffword_delete ffword target  ) 
 

Deletes an ffword.

Only deletes the string data of the word at the moment, but might do something creative in the future.

Parameters:
target The ffword to delete
Returns:
0 on success; negative on error

Definition at line 57 of file ffword.c.

References ffstring_delete().

Referenced by ffpriv_genitive_plural(), and ffpriv_partitive_stem().

ffint32 ffword_finalize ffword target  ) 
 

Delete an ffword without deallocating the real string data of the str member.

After finalizing the only usable member of an ffword is the data string. ffwords do not need to be deleted after finalizing. Finalizing only decreases the ffstring instance counter at the moment, but might do something creative in the future.

Parameters:
target The ffword to finalize
Returns:
0 on success; negative on error

Definition at line 84 of file ffword.c.

References ffstring_decinst().

Referenced by ff_abessive_plural(), ff_abessive_singular(), ff_ablative_plural(), ff_ablative_singular(), ff_adessive_plural(), ff_adessive_singular(), ff_allative_plural(), ff_allative_singular(), ff_comitative_plural(), ff_elative_plural(), ff_elative_singular(), ff_essive_plural(), ff_essive_singular(), ff_genitive_plural(), ff_genitive_singular(), ff_illative_plural(), ff_illative_singular(), ff_inessive_plural(), ff_inessive_singular(), ff_instructive_plural(), ff_instructive_singular(), ff_nominative_plural(), ff_partitive_plural(), ff_partitive_singular(), ff_translative_plural(), and ff_translative_singular().

ffint32 ffword_move ffword source,
ffword target
 

Replaces the data of target with the data of source and then deletes the source.

Metadata is not replaced.

Parameters:
source The ffword to move
target The ffword to move to
Returns:
0 on success; negative on error

ffint32 ffword_swap_delete ffword source,
ffword target
 

Definition at line 66 of file ffword.c.

References ffstring_delete().

Referenced by ffpriv_plural_stem().


Generated on Sun May 15 21:50:48 2005 for FinFlect by  doxygen 1.4.1