Collaboration diagram for Metadata Functions:
|
Files | |
| file | psMetadata.h |
| Contains metadata struuctures, enumerations and functions prototypes. | |
| file | psMetadataIO.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 |
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 |
Typedefs | |
| typedef psMetadata | psMetadata |
| Metadata data structure. | |
| typedef psMetadataItem | psMetadataItem |
| Metadata item data structure. | |
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 } |
| Metadata item type. More... | |
| enum | psMetadataFlags { PS_META_DEFAULT = 0, PS_META_REPLACE = 0x1000000, PS_META_DUPLICATE_OK = 0x2000000 } |
| Option flags for psMetadata functions. More... | |
Functions | |
| psMetadataItem * | psMetadataItemAlloc (const char *name, psMetadataType type, const char *comment,...) |
| Create a metadata item. | |
| 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, psBool value) |
| Create a metadata item with specified psBool data. | |
| psMetadataItem * | psMetadataItemAllocV (const char *name, psMetadataType type, const char *comment, va_list list) |
| Create a metadata item with va_list. | |
| psMetadata * | psMetadataAlloc (void) |
| Create a metadata collection. | |
| psBool | psMetadataAddItem (psMetadata *md, psMetadataItem *item, psS32 location, psS32 flags) |
| Add existing metadata item to metadata collection. | |
| psBool | psMetadataAdd (psMetadata *md, psS32 location, const char *name, int type, const char *comment,...) |
| Create and add a metadata item to metadata collection. | |
| psBool | psMetadataAddV (psMetadata *md, psS32 location, const char *name, int type, const char *comment, va_list list) |
| Create and add a metadata item to metadata collection. | |
| psBool | psMetadataAddS32 (psMetadata *md, psS32 location, const char *name, const char *comment, psS32 value) |
| psBool | psMetadataAddF32 (psMetadata *md, psS32 location, const char *name, const char *comment, psF32 value) |
| psBool | psMetadataAddF64 (psMetadata *md, psS32 location, const char *name, const char *comment, psF64 value) |
| psBool | psMetadataAddList (psMetadata *md, psS32 location, const char *name, const char *comment, psList *value) |
| psBool | psMetadataAddStr (psMetadata *md, psS32 location, const char *name, const char *comment, const char *value) |
| psBool | psMetadataAddVector (psMetadata *md, psS32 location, const char *name, const char *comment, psVector *value) |
| psBool | psMetadataAddImage (psMetadata *md, psS32 location, const char *name, const char *comment, psImage *value) |
| psBool | psMetadataAddHash (psMetadata *md, psS32 location, const char *name, const char *comment, psHash *value) |
| psBool | psMetadataAddLookupTable (psMetadata *md, psS32 location, const char *name, const char *comment, psLookupTable *value) |
| psBool | psMetadataAddUnknown (psMetadata *md, psS32 location, const char *name, const char *comment, psPtr value) |
| psBool | psMetadataAddMetadata (psMetadata *md, psS32 location, const char *name, const char *comment, psMetadata *value) |
| psBool | psMetadataRemove (psMetadata *md, psS32 where, const char *key) |
| Remove an item from metadata collection. | |
| psMetadataItem * | psMetadataLookup (psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name. | |
| psF64 | psMetadataLookupF64 (psBool *status, psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its double precision value. | |
| psF32 | psMetadataLookupF32 (psBool *status, psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its single precision value. | |
| psS32 | psMetadataLookupS32 (psBool *status, psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psBool | psMetadataLookupBool (psBool *status, psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its boolean value. | |
| psPtr | psMetadataLookupPtr (psBool *status, psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psMetadataItem * | psMetadataGet (psMetadata *md, psS32 location) |
| Find an item in the metadata collection based on list index. | |
| psMetadataIterator * | psMetadataIteratorAlloc (psMetadata *md, int location, const char *regex) |
| Creates a psMetadataIterator to iterate over the specified psMetadata. | |
| psBool | psMetadataIteratorSet (psMetadataIterator *iterator, int 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. | |
| p_psParseLevelInfo * | p_psParseLevelInfoAlloc (void) |
| bool | psMetadataItemPrint (FILE *fd, const char *format, const psMetadataItem *metadataItem) |
| Print metadata item to file. | |
| psMetadata * | psMetadataReadHeader (psMetadata *output, char *extName, psS32 extNum, char *fileName) |
| Read metadata header. | |
| psMetadata * | psMetadataConfigParse (psMetadata *md, psU32 *nFail, const char *fileName, psBool overwrite) |
| Read metadata configuration file. | |
| psMetadata * | psMetadataConfigParseXml (psMetadata *md, psU32 *nFail, const char *fileName, psBool overwrite) |
| Read XML metadata configuration file. | |
|
|
Value: (TYPE == PS_META_S32 || \ TYPE == PS_META_F32 || \ TYPE == PS_META_F64 || \ TYPE == PS_META_BOOL) Definition at line 57 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 63 of file psMetadata.h. |
|
|
Definition at line 81 of file psMetadata.h. |
|
|
Definition at line 82 of file psMetadata.h. |
|
|
Metadata data structure. Struct for holding metadata items. Metadata items are held in two containers. The first employs a doubly-linked list to preserve the order of the metadata. The second container employs a hash table which allows fast lookup when given a metadata keyword. |
|
|
Metadata item data structure. Struct for maintaining metadata items of varying types. It also contains information about the item name, flags, comments, and other items with the same name. |
|
|
Option flags for psMetadata functions. Enumeration for the modification of the behaviour in psMetadataAddItem.
Definition at line 75 of file psMetadata.h. |
|
|
Metadata item type. Enumeration for maintaining metadata item types.
Definition at line 38 of file psMetadata.h. |
|
|
|
|
||||||||||||||||||||||||||||
|
Create and add a metadata item to metadata collection. Creates a new metadata item add to the metadata collection.
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
Add existing metadata item to metadata collection. Add a metadata item that has already been created to the metadata collection.
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
Create and add a metadata item to metadata collection. Creates a new metadata item add to the metadata collection.
|
|
||||||||||||||||||||||||
|
|
|
|
Create a metadata collection. Returns an empty metadata container with fully allocated internal metadata containers.
|
|
||||||||||||||||||||
|
Read metadata configuration file. Loads pre-defined settings by parsing a configuration file into a psMetadata structure.
|
|
||||||||||||||||||||
|
Read XML metadata configuration file. Loads pre-defined XML settings by parsing a configuration file into a psMetadata structure.
|
|
||||||||||||
|
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 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.
|
|
||||||||||||||||||||
|
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.1