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_META_IS_PRIMITIVE(TYPE) |
| #define | PS_META_PRIMITIVE_TYPE(METATYPE) |
| #define | PS_METADATA_FLAGS_MASK 0xFF000000 |
| #define | PS_METADATA_TYPE_MASK 0x00FFFFFF |
Enumerations | |
| enum | psMetadataType { PS_META_S32 = PS_TYPE_S32, PS_META_F32 = PS_TYPE_F32, PS_META_F64 = PS_TYPE_F64, PS_META_BOOL = PS_TYPE_BOOL, PS_META_LIST = 0x10000, PS_META_STR, PS_META_VEC, PS_META_IMG, PS_META_HASH, PS_META_LOOKUPTABLE, PS_META_JPEG, PS_META_PNG, PS_META_ASTROM, PS_META_UNKNOWN, PS_META_MULTI, PS_META_META = PS_DATA_METADATA, PS_META_ARRAY, PS_META_TIME } |
| Metadata item type. More... | |
| 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 * | 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. | |
| 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. | |
| 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. | |
| 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. | |
| char * | psMetadataLookupString (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. | |
| 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_META_S32 || \ TYPE == PS_META_F32 || \ TYPE == PS_META_F64 || \ TYPE == PS_META_BOOL) Definition at line 58 of file psMetadata.h. |
|
|
Value: ( \
(METATYPE==PS_META_S32) ? PS_TYPE_S32 : \
(METATYPE==PS_META_F32) ? PS_TYPE_F32 : \
(METATYPE==PS_META_F64) ? PS_TYPE_F64 : \
(METATYPE==PS_META_BOOL) ? PS_TYPE_BOOL : 0 )
Definition at line 64 of file psMetadata.h. |
|
|
Definition at line 83 of file psMetadata.h. |
|
|
Definition at line 84 of file psMetadata.h. |
|
|
Option flags for psMetadata functions. Enumeration for the modification of the behaviour in psMetadataAddItem.
Definition at line 76 of file psMetadata.h. |
|
|
Metadata item type. Enumeration for maintaining metadata item types.
Definition at line 38 of file psMetadata.h. |
|
|
Allocates a p_psParseLevelInfo structure.
|
|
|
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 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.
|
|
||||||||||||
|
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 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.
|
1.4.2