Changeset 11706
- Timestamp:
- Feb 8, 2007, 11:17:02 AM (19 years ago)
- Location:
- trunk/psLib/src/types
- Files:
-
- 2 edited
-
psMetadata.c (modified) (17 diffs)
-
psMetadata.h (modified) (72 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadata.c
r11669 r11706 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.15 0$ $Name: not supported by cvs2svn $15 * @date $Date: 2007-02-0 6 21:55:28$14 * @version $Revision: 1.151 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2007-02-08 21:17:02 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 139 139 /*****************************************************************************/ 140 140 141 psMetadataItem* psMetadataItemAlloc(const char *name, 142 psDataType type, 143 const char *comment, 144 ...) 141 psMetadataItem* p_psMetadataItemAlloc(const char *file, 142 unsigned int lineno, 143 const char *func, 144 const char *name, 145 psDataType type, 146 const char *comment, 147 ...) 145 148 { 146 149 va_list argPtr; … … 151 154 152 155 // Call metadata item allocation 153 metadataItem = p sMetadataItemAllocV(name, type, comment, argPtr);156 metadataItem = p_psMetadataItemAllocV(file, lineno, func, name, type, comment, argPtr); 154 157 155 158 // Clean up stack after variable arguement has been used … … 196 199 197 200 198 psMetadataItem* psMetadataItemAllocV(const char *name, 201 psMetadataItem* p_psMetadataItemAllocV(const char *file, 202 unsigned int lineno, 203 const char *func, 204 const char *name, 199 205 psDataType type, 200 206 const char *comment, … … 207 213 208 214 // Allocate metadata item 209 metadataItem = (psMetadataItem*) p sAlloc(sizeof(psMetadataItem));215 metadataItem = (psMetadataItem*) p_psAlloc(file, lineno, func, sizeof(psMetadataItem)); 210 216 metadataItem->data.V = NULL; 211 217 … … 318 324 } 319 325 320 psMetadata* psMetadataAlloc(void) 326 psMetadata* p_psMetadataAlloc(const char *file, 327 unsigned int lineno, 328 const char *func) 321 329 { 322 330 psList* list = NULL; … … 325 333 326 334 // Allocate metadata 327 metadata = (psMetadata*) p sAlloc(sizeof(psMetadata));335 metadata = (psMetadata*) p_psAlloc(file, lineno, func, sizeof(psMetadata)); 328 336 // Set deallocator 329 337 psMemSetDeallocator(metadata, (psFreeFunc) metadataFree); … … 347 355 348 356 349 psMetadataItem *psMetadataItemCopy(const psMetadataItem *in) 357 psMetadataItem *p_psMetadataItemCopy(const char *file, 358 unsigned int lineno, 359 const char *func, 360 const psMetadataItem *in) 350 361 { 351 362 PS_ASSERT_PTR_NON_NULL(in,NULL); … … 355 366 #define PS_METADATA_ITEM_COPY_CASE(NAME,TYPE) \ 356 367 case PS_DATA_##NAME: \ 357 newItem = p sMetadataItemAlloc(in->name, PS_DATA_##NAME, in->comment, in->data.TYPE); \368 newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_##NAME, in->comment, in->data.TYPE); \ 358 369 break; \ 359 370 … … 376 387 psVector *vecCopy = psVectorCopy(NULL, (psVector*)(in->data.V), 377 388 ((psVector*)(in->data.V))->type.type); 378 newItem = p sMetadataItemAlloc(in->name, PS_DATA_VECTOR, in->comment, vecCopy);389 newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_VECTOR, in->comment, vecCopy); 379 390 psFree(vecCopy); // Drop reference 380 391 break; … … 390 401 } 391 402 } 392 newItem = p sMetadataItemAlloc(in->name, PS_DATA_TIME, in->comment, timeCopy);403 newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_TIME, in->comment, timeCopy); 393 404 if (timeCopy) { 394 405 psFree(timeCopy); // Drop reference … … 399 410 // Metadata: copy the next level and stuff that in too 400 411 psMetadata *metadata = psMetadataCopy(NULL, in->data.md); 401 newItem = p sMetadataItemAlloc(in->name, PS_DATA_METADATA, in->comment, metadata);412 newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_METADATA, in->comment, metadata); 402 413 psFree(metadata); // Drop reference 403 414 break; … … 406 417 psRegion *region = in->data.V; // The region 407 418 psRegion *new = psRegionAlloc(region->x0, region->x1, region->y0, region->y1); // Copy of the region 408 newItem = p sMetadataItemAlloc(in->name, PS_DATA_REGION, in->comment, new);419 newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_REGION, in->comment, new); 409 420 psFree(new); // Drop reference 410 421 break; … … 413 424 // Other kinds of pointers 414 425 psLogMsg(__func__, PS_LOG_WARN, "Copying a pointer in the metadata item: %x\n", in->type); 415 newItem = p sMetadataItemAlloc(in->name, in->type, in->comment, in->data.V);426 newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, in->type, in->comment, in->data.V); 416 427 break; 417 428 } … … 420 431 } 421 432 422 psMetadata *psMetadataCopy(psMetadata *out, 423 const psMetadata *in) 433 psMetadata *p_psMetadataCopy(const char *file, 434 unsigned int lineno, 435 const char *func, 436 psMetadata *out, 437 const psMetadata *in) 424 438 { 425 439 … … 437 451 bool outAlloced = false; 438 452 if (out == NULL) { 439 out = p sMetadataAlloc();453 out = p_psMetadataAlloc(file, lineno, func); 440 454 outAlloced = true; 441 455 } … … 957 971 958 972 // XXX should md be const? 959 psMetadataIterator* psMetadataIteratorAlloc(const psMetadata* md, 960 long location, 961 const char* regex) 973 psMetadataIterator* p_psMetadataIteratorAlloc(const char *file, 974 unsigned int lineno, 975 const char *func, 976 const psMetadata* md, 977 long location, 978 const char* regex) 962 979 { 963 980 PS_ASSERT_PTR_NON_NULL(md,NULL); 964 981 PS_ASSERT_PTR_NON_NULL(md->list,NULL); 965 982 966 psMetadataIterator* newIter = p sAlloc(sizeof(psMetadataIterator));983 psMetadataIterator* newIter = p_psAlloc(file, lineno, func, sizeof(psMetadataIterator)); 967 984 psMemSetDeallocator(newIter, (psFreeFunc) metadataIteratorFree); 968 985 -
trunk/psLib/src/types/psMetadata.h
r11669 r11706 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.9 6$ $Name: not supported by cvs2svn $12 * @date $Date: 2007-02-0 6 21:55:28$11 * @version $Revision: 1.97 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-02-08 21:17:02 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 67 67 #define PS_METADATA_TYPE_MASK 0x00FFFFFF 68 68 69 69 70 /** Metadata data structure. 70 71 * … … 82 83 psMetadata; 83 84 85 84 86 /** Metadata iterator 85 87 * … … 92 94 } 93 95 psMetadataIterator; 96 94 97 95 98 /** Metadata item data structure. … … 124 127 psMetadataItem; 125 128 129 126 130 /** Create a metadata item. 127 131 * … … 139 143 * @return psMetadataItem* : Pointer metadata item. 140 144 */ 145 #ifdef DOXYGEN 141 146 psMetadataItem* psMetadataItemAlloc( 142 147 const char *name, ///< Name of metadata item. … … 144 149 const char *comment, ///< Comment for metadata item. 145 150 ... ///< Arguments for name formatting and metadata item data. 146 ) 147 ; 151 ); 152 #else // ifdef DOXYGEN 153 psMetadataItem* p_psMetadataItemAlloc( 154 const char *file, ///< File of caller 155 unsigned int lineno, ///< Line number of caller 156 const char *func, ///< Function name of caller 157 const char *name, ///< Name of metadata item. 158 psDataType type, ///< Type of metadata item. 159 const char *comment, ///< Comment for metadata item. 160 ... ///< Arguments for name formatting and metadata item data. 161 ); 162 #define psMetadataItemAlloc(name, type, ...) \ 163 p_psMetadataItemAlloc(__FILE__, __LINE__, __func__, name, type, __VA_ARGS__) 164 #endif // ifdef DOXYGEN 165 148 166 149 167 /** Checks the type of a particular pointer. … … 157 175 ); 158 176 177 // XXX Although all of the psMetadataItemAlloc[type] prototypes are allocators, 178 // I've decided not to modify them all to pass in file, lineno, func. 179 // Hopefully these prototypes will become macros or generated by macros some day 180 // so this can be done automatically. -JH 159 181 160 182 /** Create a metadata item with specified string data. … … 171 193 ); 172 194 195 173 196 /** Create a metadata item with specified psF32 data. 174 197 * … … 197 220 ); 198 221 222 199 223 /** Create a metadata item with specified psS8 data. 200 224 * … … 210 234 ); 211 235 236 212 237 /** Create a metadata item with specified psS16 data. 213 238 * … … 223 248 ); 224 249 250 225 251 /** Create a metadata item with specified psS32 data. 226 252 * … … 236 262 ); 237 263 264 238 265 /** Create a metadata item with specified psS64 data. 239 266 * … … 249 276 ); 250 277 278 251 279 /** Create a metadata item with specified psU8 data. 252 280 * … … 262 290 ); 263 291 292 264 293 /** Create a metadata item with specified psU16 data. 265 294 * … … 275 304 ); 276 305 306 277 307 /** Create a metadata item with specified psU32 data. 278 308 * … … 288 318 ); 289 319 320 290 321 /** Create a metadata item with specified psU64 data. 291 322 * … … 301 332 ); 302 333 334 303 335 /** Create a metadata item with specified bool data. 304 336 * … … 313 345 bool value ///< the value of the metadata item. 314 346 ); 347 315 348 316 349 /** Create a metadata item with specified psPtr data. … … 328 361 ); 329 362 330 #ifndef SWIG 363 331 364 /** Create a metadata item with va_list. 332 365 * … … 344 377 * @return psMetadataItem* : Pointer metadata item. 345 378 */ 379 #ifndef SWIG 380 #ifdef DOXYGEN 346 381 psMetadataItem* psMetadataItemAllocV( 347 382 const char *name, ///< Name of metadata item. … … 350 385 va_list list ///< Arguments for name formatting and metadata item data. 351 386 ); 387 #else // ifdef DOXYGEN 388 psMetadataItem* p_psMetadataItemAllocV( 389 const char *file, ///< File of caller 390 unsigned int lineno, ///< Line number of caller 391 const char *func, ///< Function name of caller 392 const char *name, ///< Name of metadata item. 393 psDataType type, ///< Type of metadata item. 394 const char *comment, ///< Comment for metadata item. 395 va_list list ///< Arguments for name formatting and metadata item data. 396 ); 397 #define psMetadataItemAllocV(name, type, comment, list) \ 398 p_psMetadataItemAllocV(__FILE__, __LINE__, __func__, name, type,comment, list) 399 #endif // ifdef DOXYGEN 352 400 #endif // #ifndef SWIG 401 353 402 354 403 /** Create a metadata collection. … … 359 408 * @return psMetadata* : Pointer metadata. 360 409 */ 410 #ifdef DOXYGEN 361 411 psMetadata* psMetadataAlloc(void); 412 #else // ifdef DOXYGEN 413 psMetadata* p_psMetadataAlloc( 414 const char *file, ///< File of caller 415 unsigned int lineno, ///< Line number of caller 416 const char *func ///< Function name of caller 417 ); 418 #define psMetadataAlloc() \ 419 p_psMetadataAlloc(__FILE__, __LINE__, __func__) 420 #endif // ifdef DOXYGEN 362 421 363 422 364 423 /** Checks the type of a particular pointer. 365 424 * 366 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 425 * Uses the appropriate deallocation function in psMemBlock to check the ptr 426 * datatype. 367 427 * 368 428 * @return bool: True if the pointer matches a psMetadata structure, false otherwise. … … 372 432 ); 373 433 434 374 435 /** Creates a new copy of a psMetadataItem. 375 436 * 376 437 * @return psMetadataItem*: the copy of the psMetadataItem 377 438 */ 439 #ifdef DOXYGEN 378 440 psMetadataItem *psMetadataItemCopy( 379 const psMetadataItem *in ///< metadata item to be copied 380 ); 441 const psMetadataItem *in ///< metadata item to be copied 442 ); 443 #else // ifdef DOXYGEN 444 psMetadataItem *p_psMetadataItemCopy( 445 const char *file, ///< File of caller 446 unsigned int lineno, ///< Line number of caller 447 const char *func, ///< Function name of caller 448 const psMetadataItem *in ///< metadata item to be copied 449 ); 450 #define psMetadataItemCopy(in) \ 451 p_psMetadataItemCopy(__FILE__, __LINE__, __func__, in) 452 #endif // ifdef DOXYGEN 453 381 454 382 455 /** Create a copy of an existing psMetadata collection. 383 456 * 384 * Creates a new copy of all the psMetadataItems in the psMetadata collection, in, and 385 * returns them in out, or creates a new container if out is NULL. If an error occurs, 386 * NULL is returned but out may still have been updated if it is non-NULL. 457 * Creates a new copy of all the psMetadataItems in the psMetadata collection, 458 * in, and returns them in out, or creates a new container if out is NULL. If 459 * an error occurs, NULL is returned but out may still have been updated if it 460 * is non-NULL. 387 461 * 388 462 * @return psMetadata*: the copy of the psMetadata container. 389 463 */ 464 #ifdef DOXYGEN 390 465 psMetadata *psMetadataCopy( 391 466 psMetadata *out, ///< output Metadata container for copying. 392 467 const psMetadata *in ///< Metadata collection to be copied. 393 468 ); 469 #else // ifdef DOXYGEN 470 psMetadata *p_psMetadataCopy( 471 const char *file, ///< File of caller 472 unsigned int lineno, ///< Line number of caller 473 const char *func, ///< Function name of caller 474 psMetadata *out, ///< output Metadata container for copying. 475 const psMetadata *in ///< Metadata collection to be copied. 476 ); 477 #define psMetadataCopy(out, in) \ 478 p_psMetadataCopy(__FILE__, __LINE__, __func__, out, in) 479 #endif // ifdef DOXYGEN 480 394 481 395 482 /** Copy a metadata item from one psMetadata to another. 396 483 * 397 * Creates a copy of a psMetadataItem from in and appends it to out. If out is NULL,398 * a new container is created.484 * Creates a copy of a psMetadataItem from in and appends it to out. If out 485 * is NULL, a new container is created. 399 486 * 400 487 * @return bool: True if successful, otherwise false. … … 405 492 const char *key ///< key to identify the metadata item for copying. 406 493 ); 494 407 495 408 496 /** Add existing metadata item to metadata collection. … … 420 508 ); 421 509 510 422 511 /** Create and add a metadata item to metadata collection. 423 512 * … … 435 524 ); 436 525 526 527 /** Create and add a metadata item to metadata collection. 528 * 529 * Creates a new metadata item add to the metadata collection. 530 * 531 * @return bool: True for success, false for failure. 532 */ 437 533 #ifndef SWIG 438 /** Create and add a metadata item to metadata collection.439 *440 * Creates a new metadata item add to the metadata collection.441 *442 * @return bool: True for success, false for failure.443 */444 534 bool psMetadataAddV( 445 535 psMetadata* md, ///< Metadata collection to insert metadata item. … … 452 542 #endif // #ifndef SWIG 453 543 544 454 545 /** Add a bool value to metadata collection. 455 546 * … … 465 556 ); 466 557 558 467 559 /** Add a psS8 value to metadata collection. 468 560 * … … 478 570 ); 479 571 572 480 573 /** Add a psS16 value to metadata collection. 481 574 * … … 491 584 ); 492 585 586 493 587 /** Add a psS32 value to metadata collection. 494 588 * … … 504 598 ); 505 599 600 506 601 /** Add a psS64 value to metadata collection. 507 602 * … … 517 612 ); 518 613 614 519 615 /** Add a psU8 value to metadata collection. 520 616 * … … 530 626 ); 531 627 628 532 629 /** Add a psU16 value to metadata collection. 533 630 * … … 543 640 ); 544 641 642 545 643 /** Add a psU32 value to metadata collection. 546 644 * … … 556 654 ); 557 655 656 558 657 /** Add a psU64 value to metadata collection. 559 658 * … … 568 667 psU64 value ///< Value for metadata item data 569 668 ); 669 570 670 571 671 /** Add a psF32 value to metadata collection. … … 582 682 ); 583 683 684 584 685 /** Add a psF64 value to metadata collection. 585 686 * … … 595 696 ); 596 697 698 597 699 /** Add a psList to metadata collection. 598 700 * … … 608 710 ); 609 711 712 610 713 /** Add a string to metadata collection. 611 714 * … … 621 724 ); 622 725 726 623 727 /** Add a vector to metadata collection. 624 728 * … … 634 738 ); 635 739 740 636 741 /** Add a array to metadata collection. 637 742 * … … 647 752 ); 648 753 754 649 755 /** Add an Image to metadata collection. 650 756 * … … 660 766 ); 661 767 768 662 769 /** Add a Time to metadata collection. 663 770 * … … 673 780 ); 674 781 782 675 783 /** Add a Hash to metadata collection. 676 784 * … … 686 794 ); 687 795 796 688 797 /** Add a LookupTable to metadata collection. 689 798 * … … 699 808 ); 700 809 810 701 811 /** Add an Unknown (psPtr) to metadata collection. 702 812 * … … 712 822 ); 713 823 824 714 825 /** Add a psPtr to metadata collection. 715 826 * … … 725 836 ); 726 837 838 727 839 /** Add Metadata to metadata collection. 728 840 * … … 737 849 psMetadata* value ///< Metadata for metadata item data 738 850 ); 851 739 852 740 853 /** Removes an item from metadata by key name. … … 746 859 const char *key ///< Name of metadata key. 747 860 ); 861 748 862 749 863 /** Removes an item from metadata by index number. … … 756 870 ); 757 871 872 758 873 /** Find an item in the metadata collection based on key name. 759 874 * … … 769 884 ); 770 885 886 771 887 /** Find an item in the metadata collection based on key name and return its double precision value. 772 888 * 773 889 * Items may be found in the metadata by providing a key. If the key is 774 * non-unique, the value of the first item is returned. If the item is not found, zero is775 * returned.890 * non-unique, the value of the first item is returned. If the item is not 891 * found, zero is returned. 776 892 * 777 893 * @return psF64 : Value of metadata item. … … 783 899 ); 784 900 901 785 902 /** Find an item in the metadata collection based on key name and return its single precision value. 786 903 * 787 904 * Items may be found in the metadata by providing a key. If the key is 788 * non-unique, the value of the first item is returned. If the item is not found, zero is789 * returned.905 * non-unique, the value of the first item is returned. If the item is not 906 * found, zero is returned. 790 907 * 791 908 * @return psF32 : Value of metadata item. … … 797 914 ); 798 915 916 799 917 /** Find an item in the metadata collection based on key name and return its integer value. 800 918 * 801 919 * Items may be found in the metadata by providing a key. If the key is 802 * non-unique, the value of the first item is returned. If the item is not found, zero is803 * returned.920 * non-unique, the value of the first item is returned. If the item is not 921 * found, zero is returned. 804 922 * 805 923 * @return psS8 : Value of metadata item. … … 811 929 ); 812 930 931 813 932 /** Find an item in the metadata collection based on key name and return its integer value. 814 933 * 815 934 * Items may be found in the metadata by providing a key. If the key is 816 * non-unique, the value of the first item is returned. If the item is not found, zero is817 * returned.935 * non-unique, the value of the first item is returned. If the item is not 936 * found, zero is returned. 818 937 * 819 938 * @return psS16 : Value of metadata item. … … 825 944 ); 826 945 946 827 947 /** Find an item in the metadata collection based on key name and return its integer value. 828 948 * 829 949 * Items may be found in the metadata by providing a key. If the key is 830 * non-unique, the value of the first item is returned. If the item is not found, zero is831 * returned.950 * non-unique, the value of the first item is returned. If the item is not 951 * found, zero is returned. 832 952 * 833 953 * @return psS32 : Value of metadata item. … … 839 959 ); 840 960 961 841 962 /** Find an item in the metadata collection based on key name and return its integer value. 842 963 * 843 964 * Items may be found in the metadata by providing a key. If the key is 844 * non-unique, the value of the first item is returned. If the item is not found, zero is845 * returned.965 * non-unique, the value of the first item is returned. If the item is not 966 * found, zero is returned. 846 967 * 847 968 * @return psS64 : Value of metadata item. … … 853 974 ); 854 975 976 855 977 /** Find an item in the metadata collection based on key name and return its integer value. 856 978 * 857 979 * Items may be found in the metadata by providing a key. If the key is 858 * non-unique, the value of the first item is returned. If the item is not found, zero is859 * returned.980 * non-unique, the value of the first item is returned. If the item is not 981 * found, zero is returned. 860 982 * 861 983 * @return psU8 : Value of metadata item. … … 867 989 ); 868 990 991 869 992 /** Find an item in the metadata collection based on key name and return its integer value. 870 993 * 871 994 * Items may be found in the metadata by providing a key. If the key is 872 * non-unique, the value of the first item is returned. If the item is not found, zero is873 * returned.995 * non-unique, the value of the first item is returned. If the item is not 996 * found, zero is returned. 874 997 * 875 998 * @return psU16 : Value of metadata item. … … 881 1004 ); 882 1005 1006 883 1007 /** Find an item in the metadata collection based on key name and return its integer value. 884 1008 * 885 1009 * Items may be found in the metadata by providing a key. If the key is 886 * non-unique, the value of the first item is returned. If the item is not found, zero is887 * returned.1010 * non-unique, the value of the first item is returned. If the item is not 1011 * found, zero is returned. 888 1012 * 889 1013 * @return psU32 : Value of metadata item. … … 895 1019 ); 896 1020 1021 897 1022 /** Find an item in the metadata collection based on key name and return its integer value. 898 1023 * 899 1024 * Items may be found in the metadata by providing a key. If the key is 900 * non-unique, the value of the first item is returned. If the item is not found, zero is901 * returned.1025 * non-unique, the value of the first item is returned. If the item is not 1026 * found, zero is returned. 902 1027 * 903 1028 * @return psU64 : Value of metadata item. … … 909 1034 ); 910 1035 1036 911 1037 /** Find an item in the metadata collection based on key name and return its boolean value. 912 1038 * 913 1039 * Items may be found in the metadata by providing a key. If the key is 914 * non-unique, the value of the first item is returned. If the item is not found, zero is915 * returned.1040 * non-unique, the value of the first item is returned. If the item is not 1041 * found, zero is returned. 916 1042 * 917 1043 * @return bool : Value of metadata item. … … 923 1049 ); 924 1050 1051 925 1052 /** Find an item in the metadata collection based on key name and return its integer value. 926 1053 * 927 1054 * Items may be found in the metadata by providing a key. If the key is 928 * non-unique, the value of the first item is returned. If the item is not found, zero is929 * returned.1055 * non-unique, the value of the first item is returned. If the item is not 1056 * found, zero is returned. 930 1057 * 931 1058 * @return void* : Value of metadata item. … … 936 1063 const char *key ///< Name of metadata key. 937 1064 ); 1065 938 1066 939 1067 /** Find an item in the metadata collection based on list index. … … 949 1077 ); 950 1078 1079 951 1080 /** Creates a psMetadataIterator to iterate over the specified psMetadata. 952 1081 * … … 957 1086 * @return psMetadataIterator* a new psMetadataIterator, of NULL if error occurred 958 1087 */ 1088 #ifdef DOXYGEN 959 1089 psMetadataIterator* psMetadataIteratorAlloc( 960 const psMetadata* md, ///< the psMetadata to iterate with961 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL1090 const psMetadata* md, ///< the psMetadata to iterate with 1091 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 962 1092 const char* regex 963 1093 ///< A regular expression for subsetting the psMetadata. If NULL, no 964 1094 ///< subsetting is performed. 965 1095 ); 1096 #else // ifdef DOXYGEN 1097 psMetadataIterator* p_psMetadataIteratorAlloc( 1098 const char *file, ///< File of caller 1099 unsigned int lineno, ///< Line number of caller 1100 const char *func, ///< Function name of caller 1101 const psMetadata* md, ///< the psMetadata to iterate with 1102 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 1103 const char* regex 1104 ///< A regular expression for subsetting the psMetadata. If NULL, no 1105 ///< subsetting is performed. 1106 ); 1107 #define psMetadataIteratorAlloc(md, location, regex) \ 1108 p_psMetadataIteratorAlloc(__FILE__, __LINE__, __func__, md, location, regex) 1109 #endif // ifdef DOXYGEN 1110 966 1111 967 1112 /** Set the iterator of the psMetadat to a given position. If location is … … 975 1120 ); 976 1121 1122 977 1123 /** Position the specified iterator to the next matching item in psMetadata, 978 1124 * given the regular expression of the iterator … … 984 1130 psMetadataIterator* iterator ///< iterator to move 985 1131 ); 1132 986 1133 987 1134 /** Position the specified iterator to the previous matching item in psMetadata, … … 996 1143 ); 997 1144 1145 998 1146 /** Find an item in the metadata collection based on key name and return its metadata value. 999 1147 * 1000 1148 * Items may be found in the metadata by providing a key. If the key is 1001 * non-unique, the value of the first item is returned. If the item is not found, zero is1002 * returned.1149 * non-unique, the value of the first item is returned. If the item is not 1150 * found, zero is returned. 1003 1151 * 1004 1152 * @return psMetadata*: Value of metadata item. … … 1010 1158 ); 1011 1159 1160 1012 1161 /** Find an item in the metadata collection based on key name and return its string value. 1013 1162 * 1014 1163 * Items may be found in the metadata by providing a key. If the key is 1015 * non-unique, the value of the first item is returned. If the item is not found, zero is1016 * returned.1164 * non-unique, the value of the first item is returned. If the item is not 1165 * found, zero is returned. 1017 1166 * 1018 1167 * @return psString: Value of metadata item. … … 1024 1173 ); 1025 1174 1175 1026 1176 /** Find an item in the metadata collection based on key name and return it as a psTime pointer. 1027 1177 * 1028 1178 * Items may be found in the metadata by providing a key. If the key is 1029 * non-unique, the value of the first item is returned. If the item is not found, zero is1030 * returned.1179 * non-unique, the value of the first item is returned. If the item is not 1180 * found, zero is returned. 1031 1181 * 1032 1182 * @return psTime: Value of metadata item.
Note:
See TracChangeset
for help on using the changeset viewer.
