Files | |
| file | psMetadata.h |
| Contains metadata struuctures, enumerations and functions prototypes. | |
| file | psMetadataConfig.h |
| Contains metadata input/output functions. | |
Data Structures | |
| struct | psMetadata |
| Metadata data structure. More... | |
| struct | psMetadataIterator |
| Metadata iterator. More... | |
| struct | psMetadataItem |
| Metadata item data structure. More... | |
| struct | p_psParseLevelInfo |
| A metadata data structure used in parsing arrays. More... | |
Defines | |
| #define | PS_DATA_IS_PRIMITIVE(TYPE) |
| #define | PS_DATA_PRIMITIVE_TYPE(DATATYPE) |
| #define | PS_METADATA_FLAGS_MASK 0xFF000000 |
| #define | PS_METADATA_TYPE_MASK 0x00FFFFFF |
Enumerations | |
| enum | psMetadataFlags { PS_META_DEFAULT = 0, PS_META_REPLACE = 0x1000000, PS_META_DUPLICATE_OK = 0x2000000, PS_META_NULL = 0x4000000 } |
| Option flags for psMetadata functions. More... | |
Functions | |
| psMetadataItem * | psMetadataItemAlloc (const char *name, psDataType type, const char *comment,...) |
| Create a metadata item. | |
| bool | psMemCheckMetadataItem (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psMetadataItem * | psMetadataItemAllocStr (const char *name, const char *comment, const char *value) |
| Create a metadata item with specified string data. | |
| psMetadataItem * | psMetadataItemAllocF32 (const char *name, const char *comment, psF32 value) |
| Create a metadata item with specified psF32 data. | |
| psMetadataItem * | psMetadataItemAllocF64 (const char *name, const char *comment, psF64 value) |
| Create a metadata item with specified psF64 data. | |
| psMetadataItem * | psMetadataItemAllocS32 (const char *name, const char *comment, psS32 value) |
| Create a metadata item with specified psS32 data. | |
| psMetadataItem * | psMetadataItemAllocBool (const char *name, const char *comment, bool value) |
| Create a metadata item with specified psBool data. | |
| psMetadataItem * | psMetadataItemAllocPtr (const char *name, psDataType type, const char *comment, psPtr value) |
| Create a metadata item with specified psPtr data. | |
| psMetadataItem * | psMetadataItemAllocV (const char *name, psDataType type, const char *comment, va_list list) |
| Create a metadata item with va_list. | |
| psMetadata * | psMetadataAlloc (void) |
| Create a metadata collection. | |
| bool | psMemCheckMetadata (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psMetadata * | psMetadataCopy (psMetadata *out, const psMetadata *in) |
| Creates a new copy of all the psMetadataItems in the psMetadata collection, in, and returns them in out, or creates a new container if out is NULL. | |
| bool | psMetadataAddItem (psMetadata *md, const psMetadataItem *item, int location, psS32 flags) |
| Add existing metadata item to metadata collection. | |
| bool | psMetadataAdd (psMetadata *md, long location, const char *name, int format, const char *comment,...) |
| Create and add a metadata item to metadata collection. | |
| bool | psMetadataAddV (psMetadata *md, long location, const char *name, int format, const char *comment, va_list list) |
| Create and add a metadata item to metadata collection. | |
| bool | psMetadataAddBool (psMetadata *md, long location, const char *name, int format, const char *comment, bool value) |
| Add a psBool value to metadata collection. | |
| bool | psMetadataAddS32 (psMetadata *md, long location, const char *name, int format, const char *comment, psS32 value) |
| Add a psS32 value to metadata collection. | |
| bool | psMetadataAddF32 (psMetadata *md, long location, const char *name, int format, const char *comment, psF32 value) |
| Add a psF32 value to metadata collection. | |
| bool | psMetadataAddF64 (psMetadata *md, long location, const char *name, int format, const char *comment, psF64 value) |
| Add a psF64 value to metadata collection. | |
| psBool | psMetadataAddList (psMetadata *md, long location, const char *name, int format, const char *comment, psList *value) |
| Add a psList to metadata collection. | |
| bool | psMetadataAddStr (psMetadata *md, long location, const char *name, int format, const char *comment, const char *value) |
| Add a string to metadata collection. | |
| psBool | psMetadataAddVector (psMetadata *md, long location, const char *name, int format, const char *comment, psVector *value) |
| Add a vector to metadata collection. | |
| psBool | psMetadataAddArray (psMetadata *md, long location, const char *name, int format, const char *comment, psArray *value) |
| Add a array to metadata collection. | |
| psBool | psMetadataAddImage (psMetadata *md, long location, const char *name, int format, const char *comment, psImage *value) |
| Add an Image to metadata collection. | |
| psBool | psMetadataAddTime (psMetadata *md, long location, const char *name, int format, const char *comment, psTime *value) |
| Add a Time to metadata collection. | |
| psBool | psMetadataAddHash (psMetadata *md, long location, const char *name, int format, const char *comment, psHash *value) |
| Add a Hash to metadata collection. | |
| psBool | psMetadataAddLookupTable (psMetadata *md, long location, const char *name, int format, const char *comment, psLookupTable *value) |
| Add a LookupTable to metadata collection. | |
| psBool | psMetadataAddUnknown (psMetadata *md, long location, const char *name, int format, const char *comment, psPtr value) |
| Add an Unknown (psPtr) to metadata collection. | |
| bool | psMetadataAddPtr (psMetadata *md, long location, const char *name, psDataType type, const char *comment, psPtr value) |
| Add a psPtr to metadata collection. | |
| psBool | psMetadataAddMetadata (psMetadata *md, long location, const char *name, int format, const char *comment, psMetadata *value) |
| Add Metadata to metadata collection. | |
| bool | psMetadataRemove (psMetadata *md, long location, const char *key) |
| Remove an item from metadata collection. | |
| bool | psMetadataRemoveKey (psMetadata *md, const char *key) |
| Removes an item from metadata by key name. | |
| bool | psMetadataRemoveIndex (psMetadata *md, int location) |
| Removes an item from metadata by index number. | |
| psMetadataItem * | psMetadataLookup (const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name. | |
| psF64 | psMetadataLookupF64 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its double precision value. | |
| psF32 | psMetadataLookupF32 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its single precision value. | |
| psS32 | psMetadataLookupS32 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| bool | psMetadataLookupBool (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its boolean value. | |
| psPtr | psMetadataLookupPtr (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psMetadataItem * | psMetadataGet (const psMetadata *md, int location) |
| Find an item in the metadata collection based on list index. | |
| psMetadataIterator * | psMetadataIteratorAlloc (psMetadata *md, long location, const char *regex) |
| Creates a psMetadataIterator to iterate over the specified psMetadata. | |
| bool | psMetadataIteratorSet (psMetadataIterator *iterator, long location) |
| Set the iterator of the psMetadat to a given position. | |
| psMetadataItem * | psMetadataGetAndIncrement (psMetadataIterator *iterator) |
| Position the specified iterator to the next matching item in psMetadata, given the regular expression of the iterator. | |
| psMetadataItem * | psMetadataGetAndDecrement (psMetadataIterator *iterator) |
| Position the specified iterator to the previous matching item in psMetadata, given the regular expression of the iterator. | |
| psMetadata * | psMetadataLookupMD (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its metadata value. | |
| psString | psMetadataLookupStr (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its string value. | |
| void | psMetadataPrint (psMetadata *md, int level) |
| Print metadata collection to screen. | |
| int | psArgumentVerbosity (int *argc, char **argv) |
| Implements the various verbosity controls. | |
| int | psArgumentGet (int argc, char **argv, const char *arg) |
| Checks for an argument and returns its index position if found. | |
| bool | psArgumentRemove (int argnum, int *argc, char **argv) |
| Removes from the argument list the argument whose index is argnum. | |
| bool | psArgumentParse (psMetadata *arguments, int *argc, char **argv) |
| Parses the command line arguments into a metadata container of arguments. | |
| void | psArgumentHelp (psMetadata *arguments) |
| Prints to stdout a guide to the command-line arguments. | |
| p_psParseLevelInfo * | p_psParseLevelInfoAlloc (void) |
| Allocates a p_psParseLevelInfo structure. | |
| bool | psMetadataItemPrint (FILE *fd, const char *format, const psMetadataItem *item) |
| Print metadata item to file. | |
| psMetadata * | psMetadataReadHeader (psMetadata *output, char *extName, psS32 extNum, char *fileName) |
| Read metadata header. | |
| psMetadata * | psMetadataConfigParse (psMetadata *md, unsigned int *nFail, const char *filename, bool overwrite) |
| Read metadata configuration file. | |
| psString | psMetadataConfigFormat (psMetadata *md) |
| Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string. | |
| bool | psMetadataConfigWrite (psMetadata *md, const char *filename) |
| Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string that is written out to filename. | |
|
|
Value: (TYPE == PS_DATA_S32 || \ TYPE == PS_DATA_F32 || \ TYPE == PS_DATA_F64 || \ TYPE == PS_DATA_BOOL) Definition at line 34 of file psMetadata.h. |
|
|
Value: ( \
(DATATYPE==PS_DATA_S32 || DATATYPE==PS_DATA_F32 || \
DATATYPE==PS_DATA_F64 || DATATYPE==PS_DATA_BOOL) ? DATATYPE : 0)
Definition at line 40 of file psMetadata.h. |
|
|
Definition at line 58 of file psMetadata.h. |
|
|
Definition at line 59 of file psMetadata.h. |
|
|
Option flags for psMetadata functions. Enumeration for the modification of the behaviour in psMetadataAddItem.
Definition at line 51 of file psMetadata.h. |
|
|
Allocates a p_psParseLevelInfo structure.
|
|
||||||||||||||||
|
Checks for an argument and returns its index position if found.
|
|
|
Prints to stdout a guide to the command-line arguments.
|
|
||||||||||||||||
|
Parses the command line arguments into a metadata container of arguments. The input arguments shall contain the list of possible arguments as the keywords providing the default values. As matching arguments are found on the command line, the values shall be read into the arguments metadata, with the appropriate type. The arguments and their values shall be removed from the list of command line arguments as they are processed.
|
|
||||||||||||||||
|
Removes from the argument list the argument whose index is argnum. The number of entries in the argument list shall be decremented.
|
|
||||||||||||
|
Implements the various verbosity controls. Arguments shall be removed from the argument list as they are processed.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
||||||||||||||||||||||||||||
|
Create and add a metadata item to metadata collection. Creates a new metadata item add to the metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a array to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a psBool value to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a psF32 value to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a psF64 value to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a Hash to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add an Image to metadata collection.
|
|
||||||||||||||||||||
|
Add existing metadata item to metadata collection. Add a metadata item that has already been created to the metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a psList to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a LookupTable to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add Metadata to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a psPtr to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a psS32 value to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a string to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a Time to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add an Unknown (psPtr) to metadata collection.
|
|
||||||||||||||||||||||||||||
|
Create and add a metadata item to metadata collection. Creates a new metadata item add to the metadata collection.
|
|
||||||||||||||||||||||||||||
|
Add a vector to metadata collection.
|
|
|
Create a metadata collection. Returns an empty metadata container with fully allocated internal metadata containers.
|
|
|
Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string. A NULL shall be returned on error.
|
|
||||||||||||||||||||
|
Read metadata configuration file. Loads pre-defined settings by parsing a configuration file into a psMetadata structure.
|
|
||||||||||||
|
Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string that is written out to filename.
|
|
||||||||||||
|
Creates a new copy of all the psMetadataItems in the psMetadata collection, in, and returns them in out, or creates a new container if out is NULL.
|
|
||||||||||||
|
Find an item in the metadata collection based on list index. Items may be found in the metadata by their entry position in the list container.
|
|
|
Position the specified iterator to the previous matching item in psMetadata, given the regular expression of the iterator.
|
|
|
Position the specified iterator to the next matching item in psMetadata, given the regular expression of the iterator.
|
|
||||||||||||||||||||
|
Create a metadata item. Returns a fill psMetadataItem ready for insertion into the psMetadata struct. The name argument specifies the name to use for this item, and may include sprintf formatting codes. The format entry specifies both the metadata type and optional flags and is created by bit-wise or of the appropriate type and flag. The comment argument is a fixed string used to comment the metadata item. The arguments to the name formatting codes and the metadata itself are passed as arguments following the comment string. The data must be a pointer for any of the elements stored in data.void. The argument list must be interpreted appropriately by the va_list operators in the function specified size and type.
|
|
||||||||||||||||
|
Create a metadata item with specified psBool data. Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
|
|
||||||||||||||||
|
Create a metadata item with specified psF32 data. Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
|
|
||||||||||||||||
|
Create a metadata item with specified psF64 data. Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
|
|
||||||||||||||||||||
|
Create a metadata item with specified psPtr data. Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
|
|
||||||||||||||||
|
Create a metadata item with specified psS32 data. Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
|
|
||||||||||||||||
|
Create a metadata item with specified string data. Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
|
|
||||||||||||||||||||
|
Create a metadata item with va_list. Returns a fill psMetadataItem ready for insertion into the psMetadata struct. The name argument specifies the name to use for this item, and may include sprintf formatting codes. The format entry specifies both the metadata type and optional flags and is created by bit-wise or of the appropriate type and flag. The comment argument is a fixed string used to comment the metadata item. The arguments to the name formatting codes and the metadata itself are passed as arguments following the comment string. The data must be a pointer for any of the elements stored in data.void. The argument list must be interpreted appropriately by the va_list operators in the function specified size and type.
|
|
||||||||||||||||
|
Print metadata item to file. Metadata items may be printed to an open file descriptor based on a provided format. The format is a sprintf format statement with exactly one % formatting command. If the metadata item type is a numeric type, this formatting command must also be numeric, and the type conversion performed to the value to match the format type. If the metadata type is a string, the fromatting command must also be for a string. If the metadata type is any other data type, printing is not allowed.
|
|
||||||||||||||||
|
Creates a psMetadataIterator to iterate over the specified psMetadata. Supports the subsetting of the metadata via keyword using regular expression. If no regular expression is specified, iteration over the entire psMetadata is performed.
|
|
||||||||||||
|
Set the iterator of the psMetadat to a given position. If location is invalid the iterator position is not changed.
|
|
||||||||||||
|
Find an item in the metadata collection based on key name. Items may be found in the metadata by providing a key. If the key is non-unique, the first item is returned. If the item is not found, null is returned.
|
|
||||||||||||||||
|
Find an item in the metadata collection based on key name and return its boolean value. Items may be found in the metadata by providing a key. If the key is non-unique, the value of the first item is returned. If the item is not found, zero is returned.
|
|
||||||||||||||||
|
Find an item in the metadata collection based on key name and return its single precision value. Items may be found in the metadata by providing a key. If the key is non-unique, the value of the first item is returned. If the item is not found, zero is returned.
|
|
||||||||||||||||
|
Find an item in the metadata collection based on key name and return its double precision value. Items may be found in the metadata by providing a key. If the key is non-unique, the value of the first item is returned. If the item is not found, zero is returned.
|
|
||||||||||||||||
|
Find an item in the metadata collection based on key name and return its metadata value. Items may be found in the metadata by providing a key. If the key is non-unique, the value of the first item is returned. If the item is not found, zero is returned.
|
|
||||||||||||||||
|
Find an item in the metadata collection based on key name and return its integer value. Items may be found in the metadata by providing a key. If the key is non-unique, the value of the first item is returned. If the item is not found, zero is returned.
|
|
||||||||||||||||
|
Find an item in the metadata collection based on key name and return its integer value. Items may be found in the metadata by providing a key. If the key is non-unique, the value of the first item is returned. If the item is not found, zero is returned.
|
|
||||||||||||||||
|
Find an item in the metadata collection based on key name and return its string value. Items may be found in the metadata by providing a key. If the key is non-unique, the value of the first item is returned. If the item is not found, zero is returned.
|
|
||||||||||||
|
Print metadata collection to screen.
|
|
||||||||||||||||||||
|
Read metadata header. Read a metadata header from file. If the file is not found, an error is reported.
|
|
||||||||||||||||
|
Remove an item from metadata collection. Items may be removed from metadata by specifing a key or location. If the name is null, the where argument is used instead. If name is not null, where is set to PS_LIST_UNKNOWN. If the item is found, it is removed from the metadata and true is returned. If the key is not unique, then all items corresponding to it are removed.
|
|
||||||||||||
|
Removes an item from metadata by index number.
|
|
||||||||||||
|
Removes an item from metadata by key name.
|
1.4.2