Changeset 4457 for trunk/psLib/src/collections/psMetadata.h
- Timestamp:
- Jul 5, 2005, 5:04:35 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psMetadata.h (modified) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psMetadata.h
r4401 r4457 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.5 2$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 6-27 20:38:12$13 * @version $Revision: 1.53 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-07-06 03:04:35 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 55 55 PS_META_ARRAY ///< Array data (Stored as item.data.V). 56 56 } psMetadataType; 57 58 57 #define PS_META_IS_PRIMITIVE(TYPE) \ 59 58 (TYPE == PS_META_S32 || \ … … 77 76 PS_META_DEFAULT = 0, ///< default behaviour (duplicate entry is an error) 78 77 PS_META_REPLACE = 0x1000000, ///< allow entry to be replaced 79 PS_META_DUPLICATE_OK = 0x2000000 ///< allow duplicate entries 78 PS_META_DUPLICATE_OK = 0x2000000, ///< allow duplicate entries 79 PS_META_NULL = 0x4000000 ///< psMetadataItem.data is a NULL value 80 80 } psMetadataFlags; 81 81 … … 94 94 psList* list; ///< Metadata in linked-list 95 95 psHash* table; ///< Metadata in a hash table 96 void *lock; ///< Optional lock for thread safety 96 97 } 97 98 psMetadata; … … 104 105 { 105 106 psListIterator* iter; ///< iterator for the psMetadata's psList 106 regex_t* preg;///< the subsetting regular expression107 regex_t* regex; ///< the subsetting regular expression 107 108 } 108 109 psMetadataIterator; … … 116 117 { 117 118 const psS32 id; ///< Unique ID for metadata item. 118 char *name;///< Name of metadata item.119 psString name; ///< Name of metadata item. 119 120 psMetadataType type; ///< Type of metadata item. 120 121 union { … … 127 128 psPtr V; ///< Pointer to other type of data. 128 129 } data; ///< Union for data types. 129 char *comment;///< Optional comment ("", not NULL).130 psString comment; ///< Optional comment ("", not NULL). 130 131 } 131 132 psMetadataItem; … … 151 152 const char *comment, ///< Comment for metadata item. 152 153 ... ///< Arguments for name formatting and metadata item data. 153 ); 154 ) 155 ; 154 156 155 157 /** Create a metadata item with specified string data. … … 261 263 psMetadata* md, ///< Metadata collection to insert metadat item. 262 264 const psMetadataItem* item, ///< Metadata item to be added. 263 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL265 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 264 266 psS32 flags ///< Options flag mask, see psMetadataFlags enum 265 267 ); … … 273 275 bool psMetadataAdd( 274 276 psMetadata* md, ///< Metadata collection to insert metadata item. 275 int location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL277 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 276 278 const char *name, ///< Name of metadata item. 277 279 int format, ///< Type of metadata item (psMetadataType) and options (psMetadataFlags) … … 289 291 bool psMetadataAddV( 290 292 psMetadata* md, ///< Metadata collection to insert metadata item. 291 int location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL293 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 292 294 const char *name, ///< Name of metadata item. 293 295 int format, ///< Type of metadata item (psMetadataType) and options (psMetadataFlags) … … 298 300 299 301 /** Add a psS32 value to metadata collection. 300 * 301 * @return bool: True for success, False for failure. 302 * 303 * @return bool: True for success, False for failure. 302 304 */ 303 305 bool psMetadataAddS32( 304 306 psMetadata* md, ///< Metadata collection to insert metadata item 305 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL307 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 306 308 const char* name, ///< Name of metadata item 307 309 const char* comment, ///< Comment for metadata item … … 310 312 311 313 /** Add a psF32 value to metadata collection. 312 * 314 * 313 315 * @return bool: True for success, False for failure. 314 316 */ 315 317 bool psMetadataAddF32( 316 318 psMetadata* md, ///< Metadata collection to insert metadata item 317 psS32location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL319 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 318 320 const char* name, ///< Name of metadata item 319 321 const char* comment, ///< Comment for metadata item … … 322 324 323 325 /** Add a psF64 value to metadata collection. 324 * 326 * 325 327 * @return bool: True for success, False for failure. 326 328 */ 327 329 bool psMetadataAddF64( 328 330 psMetadata* md, ///< Metadata collection to insert metadata item 329 psS32location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL331 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 330 332 const char* name, ///< Name of metadata item 331 333 const char* comment, ///< Comment for metadata item … … 334 336 335 337 /** Add a psList to metadata collection. 336 * 338 * 337 339 * @return psBool: True for success, False for failure. 338 340 */ 339 341 psBool psMetadataAddList( 340 342 psMetadata* md, ///< Metadata collection to insert metadata item 341 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL343 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 342 344 const char* name, ///< Name of metadata item 343 345 const char* comment, ///< Comment for metadata item … … 346 348 347 349 /** Add a string to metadata collection. 348 * 350 * 349 351 * @return bool: True for success, False for failure. 350 352 */ 351 353 bool psMetadataAddStr( 352 354 psMetadata* md, ///< Metadata collection to insert metadata item 353 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL355 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 354 356 const char* name, ///< Name of metadata item 355 357 const char* comment, ///< Comment for metadata item … … 358 360 359 361 /** Add a vector to metadata collection. 360 * 362 * 361 363 * @return psBool: True for success, False for failure. 362 364 */ 363 365 psBool psMetadataAddVector( 364 366 psMetadata* md, ///< Metadata collection to insert metadata item 365 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL367 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 366 368 const char* name, ///< Name of metadata item 367 369 const char* comment, ///< Comment for metadata item … … 370 372 371 373 /** Add a array to metadata collection. 372 * 374 * 373 375 * @return psBool: True for success, False for failure. 374 376 */ 375 377 psBool psMetadataAddArray( 376 378 psMetadata* md, ///< Metadata collection to insert metadata item 377 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL379 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 378 380 const char* name, ///< Name of metadata item 379 381 const char* comment, ///< Comment for metadata item … … 382 384 383 385 /** Add an Image to metadata collection. 384 * 386 * 385 387 * @return psBool: True for success, False for failure. 386 388 */ 387 389 psBool psMetadataAddImage( 388 390 psMetadata* md, ///< Metadata collection to insert metadata item 389 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL391 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 390 392 const char* name, ///< Name of metadata item 391 393 const char* comment, ///< Comment for metadata item … … 394 396 395 397 /** Add a Hash to metadata collection. 396 * 398 * 397 399 * @return psBool: True for success, False for failure. 398 400 */ 399 401 psBool psMetadataAddHash( 400 402 psMetadata* md, ///< Metadata collection to insert metadata item 401 psS32location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL403 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 402 404 const char* name, ///< Name of metadata item 403 405 const char* comment, ///< Comment for metadata item … … 406 408 407 409 /** Add a LookupTable to metadata collection. 408 * 410 * 409 411 * @return psBool: True for success, False for failure. 410 412 */ 411 413 psBool psMetadataAddLookupTable( 412 414 psMetadata* md, ///< Metadata collection to insert metadata item 413 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL415 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 414 416 const char* name, ///< Name of metadata item 415 417 const char* comment, ///< Comment for metadata item … … 418 420 419 421 /** Add an Unknown (psPtr) to metadata collection. 420 * 422 * 421 423 * @return psBool: True for success, False for failure. 422 424 */ 423 425 psBool psMetadataAddUnknown( 424 426 psMetadata* md, ///< Metadata collection to insert metadata item 425 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL427 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 426 428 const char* name, ///< Name of metadata item 427 429 const char* comment, ///< Comment for metadata item … … 430 432 431 433 /** Add Metadata to metadata collection. 432 * 434 * 433 435 * @return psBool: True for success, False for failure. 434 436 */ 435 437 psBool psMetadataAddMetadata( 436 438 psMetadata* md, ///< Metadata collection to insert metadata item 437 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL439 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 438 440 const char* name, ///< Name of metadata item 439 441 const char* comment, ///< Comment for metadata item … … 453 455 bool psMetadataRemove( 454 456 psMetadata* md, ///< Metadata collection to remove metadata item. 455 int location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL457 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 456 458 const char * key ///< Name of metadata key. 457 459 ); … … 549 551 psMetadataItem* psMetadataGet( 550 552 const psMetadata* md, ///< Metadata collection to retrieve metadata item. 551 int location///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL553 long location ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 552 554 ); 553 555 … … 562 564 psMetadataIterator* psMetadataIteratorAlloc( 563 565 psMetadata* md, ///< the psMetadata to iterate with 564 int location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL566 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 565 567 const char* regex 566 568 ///< A regular expression for subsetting the psMetadata. If NULL, no … … 575 577 bool psMetadataIteratorSet( 576 578 psMetadataIterator* iterator, ///< psMetadata iterator 577 int location///< index number, PS_LIST_HEAD, or PS_LIST_TAIL579 long location ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL 578 580 ); 579 581
Note:
See TracChangeset
for help on using the changeset viewer.
