ajnam.c
Prints a report of the database attributes available (for entrails)
Synopsis
Prototype
void ajNamPrintDbAttr (
AjPFile outf,
AjBool full
);
| Type | Name | Read/Write | Description |
| AjPFile | outf | Modify | Output file |
| AjBool | full | Input | Full output if AjTrue |
| void | | RETURN | |
Input
| full: | (Input) | Full output if AjTrue |
Input & Output
Returns
Description
Prints a report of the database attributes available (for entrails)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Prints a report of the resource attributes available (for entrails)
Synopsis
Prototype
void ajNamPrintRsAttr (
AjPFile outf,
AjBool full
);
| Type | Name | Read/Write | Description |
| AjPFile | outf | Modify | Output file |
| AjBool | full | Input | Full output if AjTrue |
| void | | RETURN | |
Input
| full: | (Input) | Full output if AjTrue |
Input & Output
Returns
Description
Prints a report of the resource attributes available (for entrails)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Returns database access method information
Synopsis
Prototype
AjBool ajNamDbDetails (
const AjPStr name,
AjPStr* type,
AjBool* id,
AjBool* qry,
AjBool* all,
AjPStr* comment,
AjPStr* release,
AjPStr* methods,
AjPStr* defined
);
| Type | Name | Read/Write | Description |
| const AjPStr | name | Input | Database name |
| AjPStr* | type | Output | sequence type - 'P' or 'N' |
| AjBool* | id | Output | ajTrue = can access single entries |
| AjBool* | qry | Output | ajTrue = can access wild/query entries |
| AjBool* | all | Output | ajTrue = can access all entries |
| AjPStr* | comment | Output | comment about database |
| AjPStr* | release | Output | database release date |
| AjPStr* | methods | Output | database access methods formatted |
| AjPStr* | defined | Output | database definition file short name |
| AjBool | | RETURN | ajTrue if database details were found |
Input
| name: | (Input) | Database name |
Output
| type: | (Output) | sequence type - 'P' or 'N' |
| id: | (Output) | ajTrue = can access single entries |
| qry: | (Output) | ajTrue = can access wild/query entries |
| all: | (Output) | ajTrue = can access all entries |
| comment: | (Output) | comment about database |
| release: | (Output) | database release date |
| methods: | (Output) | database access methods formatted |
| defined: | (Output) | database definition file short name |
Returns
| AjBool: | ajTrue if database details were found |
Description
Returns database access method information
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Writes a simple list of where the internal tables came from..
Synopsis
Prototype
void ajNamListOrigin (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Writes a simple list of where the internal tables came from..
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Writes a simple list of where the internal tables came from..
Synopsis
Prototype
void ajNamDebugOrigin (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Writes a simple list of where the internal tables came from..
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Writes a simple list of all databases in the internal table.
Synopsis
Prototype
void ajNamListDatabases (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Writes a simple list of all databases in the internal table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Writes a simple debug report of all databases in the internal table.
Synopsis
Prototype
void ajNamDebugDatabases (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Writes a simple debug report of all databases in the internal table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Writes a simple debug report of all databases in the internal table.
Synopsis
Prototype
void ajNamDebugResources (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Writes a simple debug report of all databases in the internal table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Writes a simple debug report of all envornment variables
in the internal table.
Synopsis
Prototype
void ajNamDebugVariables (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Writes a simple debug report of all envornment variables
in the internal table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Creates a AjPList list of all databases in the internal table.
Synopsis
Prototype
void ajNamListListDatabases (
AjPList dbnames
);
| Type | Name | Read/Write | Description |
| AjPList | dbnames | Output | Str List of names to be populated |
| void | | RETURN | |
Output
| dbnames: | (Output) | Str List of names to be populated |
Returns
Description
Creates a AjPList list of all databases in the internal table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Creates a AjPList list of all databases in the internal table.
Synopsis
Prototype
void ajNamListListResources (
AjPList rsnames
);
| Type | Name | Read/Write | Description |
| AjPList | rsnames | Output | Str List of names to be populated |
| void | | RETURN | |
Output
| rsnames: | (Output) | Str List of names to be populated |
Returns
Description
Creates a AjPList list of all databases in the internal table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Writes a simple list of all variables in the internal table.
Synopsis
Prototype
void ajNamVariables (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Writes a simple list of all variables in the internal table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Returns true if the name is a valid database name.
Database names must start with a letter, and have 1 or more letters,
numbers or underscores. No other characters are permitted.
Synopsis
Prototype
AjBool ajNamIsDbname (
const AjPStr name
);
| Type | Name | Read/Write | Description |
| const AjPStr | name | Input | character string to find in getenv list |
| AjBool | | RETURN | True if name was defined. |
Input
| name: | (Input) | character string to find in getenv list |
Returns
| AjBool: | True if name was defined. |
Description
Returns true if the name is a valid database name.
Database names must start with a letter, and have 1 or more letters,
numbers or underscores. No other characters are permitted.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Looks for name as an environment variable.
the AjPStr for this in "value". If not found returns NULL;
Synopsis
Prototype
AjBool ajNamGetenv (
const AjPStr name,
AjPStr* value
);
| Type | Name | Read/Write | Description |
| const AjPStr | name | Input | character string to find in getenv list |
| AjPStr* | value | Output | String for the value. |
| AjBool | | RETURN | True if name was defined. |
Input
| name: | (Input) | character string to find in getenv list |
Output
| value: | (Output) | String for the value. |
Returns
| AjBool: | True if name was defined. |
Description
Looks for name as an environment variable.
the AjPStr for this in "value". If not found returns NULL;
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Looks for name as an environment variable.
the AjPStr for this in "value". If not found returns value as NULL;
Synopsis
Prototype
AjBool ajNamGetenvC (
const char* name,
AjPStr* value
);
| Type | Name | Read/Write | Description |
| const char* | name | Input | character string to find in getenv list |
| AjPStr* | value | Output | String for the value. |
| AjBool | | RETURN | True if name was defined. |
Input
| name: | (Input) | character string to find in getenv list |
Output
| value: | (Output) | String for the value. |
Returns
| AjBool: | True if name was defined. |
Description
Looks for name as an environment variable.
the AjPStr for this in "value". If not found returns value as NULL;
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Looks for name as an (upper case) environment variable,
and then as-is in the hash table and if found returns
the AjPStr for this in "value". If not found returns NULL;
Synopsis
Prototype
AjBool ajNamGetValue (
const AjPStr name,
AjPStr* value
);
| Type | Name | Read/Write | Description |
| const AjPStr | name | Input | character string find in hash table. |
| AjPStr* | value | Output | String for the value. |
| AjBool | | RETURN | True if name was defined. |
Input
| name: | (Input) | character string find in hash table. |
Output
| value: | (Output) | String for the value. |
Returns
| AjBool: | True if name was defined. |
Description
Looks for name as an (upper case) environment variable,
and then as-is in the hash table and if found returns
the AjPStr for this in "value". If not found returns NULL;
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Looks for name as an (upper case) environment variable,
and then as-is in the hash table and if found returns
the AjPStr for this in "value". If not found returns NULL;
Synopsis
Prototype
AjBool ajNamGetValueC (
const char* name,
AjPStr* value
);
| Type | Name | Read/Write | Description |
| const char* | name | Input | character string find in hash table. |
| AjPStr* | value | Output | Str for the value. |
| AjBool | | RETURN | True if name was defined. |
Input
| name: | (Input) | character string find in hash table. |
Output
| value: | (Output) | Str for the value. |
Returns
| AjBool: | True if name was defined. |
Description
Looks for name as an (upper case) environment variable,
and then as-is in the hash table and if found returns
the AjPStr for this in "value". If not found returns NULL;
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Looks for name in the hash table and if found returns
the attribute for this. If not found returns NULL;
Synopsis
Prototype
AjBool ajNamDatabase (
const AjPStr name
);
| Type | Name | Read/Write | Description |
| const AjPStr | name | Input | character string find in hash table. |
| AjBool | | RETURN | true if database name is valid. |
Input
| name: | (Input) | character string find in hash table. |
Returns
| AjBool: | true if database name is valid. |
Description
Looks for name in the hash table and if found returns
the attribute for this. If not found returns NULL;
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Initialise the variable and database definitions. Find the definition
files and read them.
Synopsis
Prototype
void ajNamInit (
const char* prefix
);
| Type | Name | Read/Write | Description |
| const char* | prefix | Input | Default prefix for all file
and variable names. |
| void | | RETURN | |
Input
| prefix: | (Input) | Default prefix for all file
and variable names. |
Returns
Description
Initialise the variable and database definitions. Find the definition
files and read them.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Delete the initialisation values in the table.
Synopsis
Prototype
void ajNamExit (
void
);
| Type | Name | Read/Write | Description |
| void | | RETURN | |
Returns
Description
Delete the initialisation values in the table.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Looks for a database name in the known definitions.
Synopsis
Prototype
AjBool ajNamDbTest (
const AjPStr dbname
);
| Type | Name | Read/Write | Description |
| const AjPStr | dbname | Input | Database name. |
| AjBool | | RETURN | ajTrue on success. |
Input
| dbname: | (Input) | Database name. |
Returns
| AjBool: | ajTrue on success. |
Description
Looks for a database name in the known definitions.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Gets the URL definition for a database definition.
Synopsis
Prototype
AjBool ajNamDbGetUrl (
const AjPStr dbname,
AjPStr* url
);
| Type | Name | Read/Write | Description |
| const AjPStr | dbname | Input | Database name. |
| AjPStr* | url | Output | URL returned. |
| AjBool | | RETURN | ajTrue if success. |
Input
| dbname: | (Input) | Database name. |
Output
| url: | (Output) | URL returned. |
Returns
| AjBool: | ajTrue if success. |
Description
Gets the URL definition for a database definition.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Gets an alias name for a database.
Synopsis
Prototype
AjBool ajNamDbGetDbalias (
const AjPStr dbname,
AjPStr* dbalias
);
| Type | Name | Read/Write | Description |
| const AjPStr | dbname | Input | Database name. |
| AjPStr* | dbalias | Output | Alias returned. |
| AjBool | | RETURN | ajTrue if success. |
Input
| dbname: | (Input) | Database name. |
Output
| dbalias: | (Output) | Alias returned. |
Returns
| AjBool: | ajTrue if success. |
Description
Gets an alias name for a database.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Given a query with database name and search fields,
fill in the common fields. The query fields are set later.
This part of the database definition is required (specifically
the "fields" definition) for setting the query details.
See also ajNamDbQuery, which calls this function if the common
query data is not yet set.
Synopsis
Prototype
AjBool ajNamDbData (
AjPSeqQuery qry
);
| Type | Name | Read/Write | Description |
| AjPSeqQuery | qry | Modify | Query structure with at least
dbname filled in |
| AjBool | | RETURN | ajTrue if success. |
Input & Output
| qry: | (Modify) | Query structure with at least
dbname filled in |
Returns
| AjBool: | ajTrue if success. |
Description
Given a query with database name and search fields,
fill in the common fields. The query fields are set later.
This part of the database definition is required (specifically
the "fields" definition) for setting the query details.
See also ajNamDbQuery, which calls this function if the common
query data is not yet set.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Given a query with database name and search fields,
fill in the access method and some common fields according
to the query level.
Synopsis
Prototype
AjBool ajNamDbQuery (
AjPSeqQuery qry
);
| Type | Name | Read/Write | Description |
| AjPSeqQuery | qry | Modify | Query structure with at least
dbname filled in |
| AjBool | | RETURN | ajTrue if success. |
Input & Output
| qry: | (Modify) | Query structure with at least
dbname filled in |
Returns
| AjBool: | ajTrue if success. |
Description
Given a query with database name and search fields,
fill in the access method and some common fields according
to the query level.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Returns the install directory root for all file searches
(package level)
Synopsis
Prototype
AjBool ajNamRootInstall (
AjPStr* root
);
| Type | Name | Read/Write | Description |
| AjPStr* | root | Output | Root. |
| AjBool | | RETURN | ajTrue on success. |
Output
Returns
| AjBool: | ajTrue on success. |
Description
Returns the install directory root for all file searches
(package level)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Returns the package name for the library
Synopsis
Prototype
AjBool ajNamRootPack (
AjPStr* pack
);
| Type | Name | Read/Write | Description |
| AjPStr* | pack | Output | Package name. |
| AjBool | | RETURN | ajTrue on success. |
Output
| pack: | (Output) | Package name. |
Returns
| AjBool: | ajTrue on success. |
Description
Returns the package name for the library
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Returns the version number for the library
Synopsis
Prototype
AjBool ajNamRootVersion (
AjPStr* version
);
| Type | Name | Read/Write | Description |
| AjPStr* | version | Output | Version number. |
| AjBool | | RETURN | ajTrue on success. |
Output
| version: | (Output) | Version number. |
Returns
| AjBool: | ajTrue on success. |
Description
Returns the version number for the library
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Returns the directory for all file searches
(package level)
Synopsis
Prototype
AjBool ajNamRoot (
AjPStr* root
);
| Type | Name | Read/Write | Description |
| AjPStr* | root | Output | Root. |
| AjBool | | RETURN | ajTrue on success. |
Output
Returns
| AjBool: | ajTrue on success. |
Description
Returns the directory for all file searches
(package level)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Returns the base directory for all for all file searches
(above package level).
Synopsis
Prototype
AjBool ajNamRootBase (
AjPStr* rootbase
);
| Type | Name | Read/Write | Description |
| AjPStr* | rootbase | Output | Root. |
| AjBool | | RETURN | ajTrue on success. |
Output
Returns
| AjBool: | ajTrue on success. |
Description
Returns the base directory for all for all file searches
(above package level).
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Resolves a variable name if the input string starts with a dollar sign.
Synopsis
Prototype
AjBool ajNamResolve (
AjPStr* name
);
| Type | Name | Read/Write | Description |
| AjPStr* | name | Output | String |
| AjBool | | RETURN | ajTrue on success. |
Output
Returns
| AjBool: | ajTrue on success. |
Description
Resolves a variable name if the input string starts with a dollar sign.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Sets special internal variables to reflect their presence.
Currently these are "namdebug, namvalid"
Synopsis
Prototype
AjBool ajNamSetControl (
const char* optionName
);
| Type | Name | Read/Write | Description |
| const char* | optionName | Input | option name |
| AjBool | | RETURN | ajTrue if option was recognised |
Input
| optionName: | (Input) | option name |
Returns
| AjBool: | ajTrue if option was recognised |
Description
Sets special internal variables to reflect their presence.
Currently these are "namdebug, namvalid"
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Return the value for a resource attribute
Synopsis
Prototype
AjBool ajNamRsAttrValue (
const AjPStr name,
const AjPStr attribute,
AjPStr* value
);
| Type | Name | Read/Write | Description |
| const AjPStr | name | Input | resource name |
| const AjPStr | attribute | Input | resource attribute |
| AjPStr* | value | Output | resource value |
| AjBool | | RETURN | true if found |
Input
| name: | (Input) | resource name |
| attribute: | (Input) | resource attribute |
Output
| value: | (Output) | resource value |
Returns
Description
Return the value for a resource attribute
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Return the value for a resource attribute
Synopsis
Prototype
AjBool ajNamRsAttrValueC (
const char* name,
const char* attribute,
AjPStr* value
);
| Type | Name | Read/Write | Description |
| const char* | name | Input | resource name |
| const char* | attribute | Input | resource attribute |
| AjPStr* | value | Output | resource value |
| AjBool | | RETURN | true if found |
Input
| name: | (Input) | resource name |
| attribute: | (Input) | resource attribute |
Output
| value: | (Output) | resource value |
Returns
Description
Return the value for a resource attribute
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Return the value for a resource attribute of type 'list'
Synopsis
Prototype
AjBool ajNamRsListValue (
const AjPStr name,
AjPStr* value
);
| Type | Name | Read/Write | Description |
| const AjPStr | name | Input | resource name |
| AjPStr* | value | Output | resource value |
| AjBool | | RETURN | true if found |
Input
| name: | (Input) | resource name |
Output
| value: | (Output) | resource value |
Returns
Description
Return the value for a resource attribute of type 'list'
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0