ajtextread.c
Datatypes: AjPTextin none AjPTable AjPTextall none
Text input objects
Sections: Text Input Constructors Text Input Destructors text input modifiers casts Text data inputs File Access
All constructors return a new text input object by pointer. It
is the responsibility of the user to first destroy any previous
text input object. The target pointer does not need to be
initialised to NULL, but it is good programming practice to do so
anyway.
Functions: ajTextinNew ajTextinNewDatatype
Creates a new text input object.
Synopsis
Prototype
AjPTextin ajTextinNew (
void
);
Type | Name | Read/Write | Description |
AjPTextin | | RETURN | New text input object. |
Returns
AjPTextin: | New text input object. |
Description
Creates a new text input object.
See Also
See other functions in this section
Availability
In release 6.4.0
Creates a new text input object for assembly data
Synopsis
Prototype
AjPTextin ajTextinNewDatatype (
const AjEDataType datatype
);
Type | Name | Read/Write | Description |
const AjEDataType | datatype | Input | Enumerated datatype |
AjPTextin | | RETURN | New text input object. |
Input
datatype: | (Input) | Enumerated datatype |
Returns
AjPTextin: | New text input object. |
Description
Creates a new text input object for assembly data
See Also
See other functions in this section
Availability
In release 6.4.0
Destruction destroys all internal data structures and frees the
memory allocated for the text input object.
Functions: ajTextinDel ajTextinDelNofile
Deletes a text input object.
Synopsis
Prototype
void ajTextinDel (
AjPTextin* pthis
);
Type | Name | Read/Write | Description |
AjPTextin* | pthis | Delete | Text input |
void | | RETURN | |
Output
Returns
Description
Deletes a text input object.
See Also
See other functions in this section
Availability
In release 6.4.0
Deletes a text input object but do not close the file as it is a
copy of a file buffer elsewhere
Synopsis
Prototype
void ajTextinDelNofile (
AjPTextin* pthis
);
Type | Name | Read/Write | Description |
AjPTextin* | pthis | Delete | Text input |
void | | RETURN | |
Output
Returns
Description
Deletes a text input object but do not close the file as it is a
copy of a file buffer elsewhere
See Also
See other functions in this section
Availability
In release 6.4.0
These functions use the contents of a text input object and
update them.
Functions: ajTextinClear ajTextinClearNofile ajTextinQryC ajTextinQryS
Clears a text input object back to "as new" condition, except
for the query list which must be preserved.
Synopsis
Prototype
void ajTextinClear (
AjPTextin thys
);
Type | Name | Read/Write | Description |
AjPTextin | thys | Output | Text input |
void | | RETURN | |
Output
Returns
Description
Clears a text input object back to "as new" condition, except
for the query list which must be preserved.
See Also
See other functions in this section
Availability
In release 6.4.0
Clears a text input object back to "as new" condition, except
for the query list which must be preserved.
Synopsis
Prototype
void ajTextinClearNofile (
AjPTextin thys
);
Type | Name | Read/Write | Description |
AjPTextin | thys | Output | Text input |
void | | RETURN | |
Output
Returns
Description
Clears a text input object back to "as new" condition, except
for the query list which must be preserved.
See Also
See other functions in this section
Availability
In release 6.4.0
Resets a text input object using a new Universal
Query Address
Synopsis
Prototype
void ajTextinQryC (
AjPTextin thys,
const char* txt
);
Type | Name | Read/Write | Description |
AjPTextin | thys | Modify | text input object. |
const char* | txt | Input | Query |
void | | RETURN | |
Input
Input & Output
thys: | (Modify) | text input object. |
Returns
Description
Resets a text input object using a new Universal
Query Address
See Also
See other functions in this section
Availability
In release 6.4.0
Resets a text input object using a new Universal
Query Address
Synopsis
Prototype
void ajTextinQryS (
AjPTextin thys,
const AjPStr str
);
Type | Name | Read/Write | Description |
AjPTextin | thys | Modify | Text input object. |
const AjPStr | str | Input | Query |
void | | RETURN | |
Input
Input & Output
thys: | (Modify) | Text input object. |
Returns
Description
Resets a text input object using a new Universal
Query Address
See Also
See other functions in this section
Availability
In release 6.4.0
Return values
Functions: ajTextinGetQryS ajTextinTrace
Returns the query of a text input object
Synopsis
Prototype
const AjPStr ajTextinGetQryS (
const AjPTextin thys
);
Type | Name | Read/Write | Description |
const AjPTextin | thys | Input | Text input object. |
const AjPStr | | RETURN | Query string |
Input
thys: | (Input) | Text input object. |
Returns
const AjPStr: | Query string |
Description
Returns the query of a text input object
See Also
See other functions in this section
Availability
In release 6.4.0
Debug calls to trace the data in a text input object.
Synopsis
Prototype
void ajTextinTrace (
const AjPTextin thys
);
Type | Name | Read/Write | Description |
const AjPTextin | thys | Input | Text input object. |
void | | RETURN | |
Input
thys: | (Input) | Text input object. |
Returns
Description
Debug calls to trace the data in a text input object.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions read the text data provided by the first argument
Functions: ajTextinRead
If the file is not yet open, calls textinQryProcess to convert the
query into an open file stream.
Uses textinRead for the actual file reading.
Returns the results in the AjPText object.
Synopsis
Prototype
AjBool ajTextinRead (
AjPTextin textin,
AjPText text
);
Type | Name | Read/Write | Description |
AjPTextin | textin | Modify | text data input definitions |
AjPText | text | Output | text data returned. |
AjBool | | RETURN | ajTrue on success. |
Output
text: | (Output) | text data returned. |
Input & Output
textin: | (Modify) | text data input definitions |
Returns
AjBool: | ajTrue on success. |
Description
If the file is not yet open, calls textinQryProcess to convert the
query into an open file stream.
Uses textinRead for the actual file reading.
Returns the results in the AjPText object.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions manage the text file access methods.
Functions: ajTextinAccessAsis ajTextinAccessFile ajTextinAccessOffset
Reads text using the 'filename' as the single input line
Synopsis
Prototype
AjBool ajTextinAccessAsis (
AjPTextin textin
);
Type | Name | Read/Write | Description |
AjPTextin | textin | Modify | Text input. |
AjBool | | RETURN | ajTrue on success. |
Input & Output
textin: | (Modify) | Text input. |
Returns
AjBool: | ajTrue on success. |
Description
Reads text using the 'filename' as the single input line
See Also
See other functions in this section
Availability
In release 6.4.0
Reads data from a named file.
Synopsis
Prototype
AjBool ajTextinAccessFile (
AjPTextin textin
);
Type | Name | Read/Write | Description |
AjPTextin | textin | Modify | Text input. |
AjBool | | RETURN | ajTrue on success. |
Input & Output
textin: | (Modify) | Text input. |
Returns
AjBool: | ajTrue on success. |
Description
Reads data from a named file.
See Also
See other functions in this section
Availability
In release 6.4.0
Reads a text from a named file, at a given offset within the file.
Synopsis
Prototype
AjBool ajTextinAccessOffset (
AjPTextin textin
);
Type | Name | Read/Write | Description |
AjPTextin | textin | Modify | Text input. |
AjBool | | RETURN | ajTrue on success. |
Input & Output
textin: | (Modify) | Text input. |
Returns
AjBool: | ajTrue on success. |
Description
Reads a text from a named file, at a given offset within the file.
See Also
See other functions in this section
Availability
In release 6.4.0
Miscellaneous
Sections: Print
Printing to a file
Functions: ajTextinprintBook ajTextinprintHtml ajTextinprintText ajTextinprintWiki
Reports the internal data structures as a Docbook table
Synopsis
Prototype
void ajTextinprintBook (
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
void | | RETURN | |
Input & Output
Returns
Description
Reports the internal data structures as a Docbook table
See Also
See other functions in this section
Availability
In release 6.4.0
Reports the internal data structures as an HTML table
Synopsis
Prototype
void ajTextinprintHtml (
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
void | | RETURN | |
Input & Output
Returns
Description
Reports the internal data structures as an HTML table
See Also
See other functions in this section
Availability
In release 6.4.0
Reports the internal data structures
Synopsis
Prototype
void ajTextinprintText (
AjPFile outf,
AjBool full
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
AjBool | full | Input | Full report (usually ajFalse) |
void | | RETURN | |
Input
full: | (Input) | Full report (usually ajFalse) |
Input & Output
Returns
Description
Reports the internal data structures
See Also
See other functions in this section
Availability
In release 6.4.0
Reports the internal data structures as a wiki table
Synopsis
Prototype
void ajTextinprintWiki (
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
void | | RETURN | |
Input & Output
Returns
Description
Reports the internal data structures as a wiki table
See Also
See other functions in this section
Availability
In release 6.4.0
Functions to initialise and clean up internals
Functions: ajTextinExit
Cleans up text data input internal memory
Synopsis
Prototype
void ajTextinExit (
void
);
Type | Name | Read/Write | Description |
void | | RETURN | |
Returns
Description
Cleans up text data input internal memory
See Also
See other functions in this section
Availability
In release 6.4.0
Functions to return internal values
Functions: ajTextinTypeGetFields ajTextinTypeGetQlinks
Returns the listof known field names for ajTextinRead
Synopsis
Prototype
const char* ajTextinTypeGetFields (
void
);
Type | Name | Read/Write | Description |
const char* | | RETURN | List of field names |
Returns
const char*: | List of field names |
Description
Returns the listof known field names for ajTextinRead
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the listof known query link operators for ajTextinRead
Synopsis
Prototype
const char* ajTextinTypeGetQlinks (
void
);
Type | Name | Read/Write | Description |
const char* | | RETURN | List of field names |
Returns
const char*: | List of field names |
Description
Returns the listof known query link operators for ajTextinRead
See Also
See other functions in this section
Availability
In release 6.4.0
Internal call register table
Sections: Cast
Return a reference to the call table
Functions: ajTextaccessGetDb ajTextaccessMethodGetQlinks ajTextaccessMethodGetScope ajTextaccessMethodTest
Returns the table in which text database access details are registered
Synopsis
Prototype
AjPTable ajTextaccessGetDb (
void
);
Type | Name | Read/Write | Description |
AjPTable | | RETURN | Access functions hash table |
Returns
AjPTable: | Access functions hash table |
Description
Returns the table in which text database access details are registered
See Also
See other functions in this section
Availability
In release 6.4.0
Tests for a named method for text file reading and returns the
known query link operators
Synopsis
Prototype
const char* ajTextaccessMethodGetQlinks (
const AjPStr method
);
Type | Name | Read/Write | Description |
const AjPStr | method | Input | Method required. |
const char* | | RETURN | Known link operators |
Input
method: | (Input) | Method required. |
Returns
const char*: | Known link operators |
Description
Tests for a named method for text file reading and returns the
known query link operators
See Also
See other functions in this section
Availability
In release 6.4.0
Tests for a named method for text file reading and returns the scope
(entry, query or all).
Synopsis
Prototype
ajuint ajTextaccessMethodGetScope (
const AjPStr method
);
Type | Name | Read/Write | Description |
const AjPStr | method | Input | Method required. |
ajuint | | RETURN | Scope flags |
Input
method: | (Input) | Method required. |
Returns
Description
Tests for a named method for text file reading and returns the scope
(entry, query or all).
See Also
See other functions in this section
Availability
In release 6.4.0
Tests for a named method for text reading.
Synopsis
Prototype
AjBool ajTextaccessMethodTest (
const AjPStr method
);
Type | Name | Read/Write | Description |
const AjPStr | method | Input | Method required. |
AjBool | | RETURN | ajTrue on success. |
Input
method: | (Input) | Method required. |
Returns
AjBool: | ajTrue on success. |
Description
Tests for a named method for text reading.
See Also
See other functions in this section
Availability
In release 6.4.0
Text Input Stream
Sections: Text Input Constructors Text Input Stream Destructors Text input stream modifiers Text input
All constructors return a new text input stream object by pointer. It
is the responsibility of the user to first destroy any previous
text input object. The target pointer does not need to be
initialised to NULL, but it is good programming practice to do so
anyway.
Functions: ajTextallNew
Creates a new text input stream object.
Synopsis
Prototype
AjPTextall ajTextallNew (
void
);
Type | Name | Read/Write | Description |
AjPTextall | | RETURN | New text input stream object. |
Returns
AjPTextall: | New text input stream object. |
Description
Creates a new text input stream object.
See Also
See other functions in this section
Availability
In release 6.4.0
Destruction destroys all internal data structures and frees the
memory allocated for the text input stream object.
Functions: ajTextallDel
Deletes a text input stream object.
Synopsis
Prototype
void ajTextallDel (
AjPTextall* pthis
);
Type | Name | Read/Write | Description |
AjPTextall* | pthis | Delete | Text input stream |
void | | RETURN | |
Output
pthis: | (Delete) | Text input stream |
Returns
Description
Deletes a text input stream object.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions use the contents of a text input stream object and
update them.
Functions: ajTextallClear
Clears a text input stream object back to "as new" condition, except
for the query list which must be preserved.
Synopsis
Prototype
void ajTextallClear (
AjPTextall thys
);
Type | Name | Read/Write | Description |
AjPTextall | thys | Output | Text input stream |
void | | RETURN | |
Output
thys: | (Output) | Text input stream |
Returns
Description
Clears a text input stream object back to "as new" condition, except
for the query list which must be preserved.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions use a text input stream object to read data
Functions: ajTextallNext
Parse a text query into format, access, file and entry
Split at delimiters. Check for the first part as a valid format
Check for the remaining first part as a database name or as a file
that can be opened.
Anything left is an entryname spec.
Return the results in the AjPText object but leave the file open for
future calls.
Synopsis
Prototype
AjBool ajTextallNext (
AjPTextall thys,
AjPText* Ptext
);
Type | Name | Read/Write | Description |
AjPTextall | thys | Output | Text input stream |
AjPText* | Ptext | Modify | Text block returned |
AjBool | | RETURN | ajTrue on success. |
Output
thys: | (Output) | Text input stream |
Input & Output
Ptext: | (Modify) | Text block returned |
Returns
AjBool: | ajTrue on success. |
Description
Parse a text query into format, access, file and entry
Split at delimiters. Check for the first part as a valid format
Check for the remaining first part as a database name or as a file
that can be opened.
Anything left is an entryname spec.
Return the results in the AjPText object but leave the file open for
future calls.
See Also
See other functions in this section
Availability
In release 6.4.0
Input formats
Sections: cast
Values for input formats
Functions: ajTextinformatTerm ajTextinformatTest
tests whether a text input format term is known
Synopsis
Prototype
AjBool ajTextinformatTerm (
const AjPStr term
);
Type | Name | Read/Write | Description |
const AjPStr | term | Input | Format term EDAM ID |
AjBool | | RETURN | ajTrue if term was accepted |
Input
term: | (Input) | Format term EDAM ID |
Returns
AjBool: | ajTrue if term was accepted |
Description
tests whether a text input format term is known
See Also
See other functions in this section
Availability
In release 6.4.0
tests whether a named text input format is known
Synopsis
Prototype
AjBool ajTextinformatTest (
const AjPStr format
);
Type | Name | Read/Write | Description |
const AjPStr | format | Input | Format |
AjBool | | RETURN | ajTrue if format was accepted |
Input
Returns
AjBool: | ajTrue if format was accepted |
Description
tests whether a named text input format is known
See Also
See other functions in this section
Availability
In release 6.4.0