Changeset 21215
- Timestamp:
- Jan 28, 2009, 5:06:43 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/types/psMetadata.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadata.h
r21183 r21215 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.10 6$ $Name: not supported by cvs2svn $12 * @date $Date: 2009-01-2 7 06:39:38$11 * @version $Revision: 1.107 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2009-01-29 03:06:43 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 609 609 610 610 611 /** Add a bool value to metadata collection. 612 * 613 * @return bool: True for success, False for failure. 614 */ 615 bool psMetadataAddBool( 616 psMetadata* md, ///< Metadata collection to insert metadata item 617 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 618 const char* name, ///< Name of metadata item 619 int format, ///< psMetadataFlag options/flags 620 const char* comment, ///< Comment for metadata item 621 bool value ///< Value for metadata item data 622 ); 623 624 625 /** Add a psS8 value to metadata collection. 626 * 627 * @return bool: True for success, False for failure. 628 */ 629 bool psMetadataAddS8( 630 psMetadata* md, ///< Metadata collection to insert metadata item 631 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 632 const char* name, ///< Name of metadata item 633 int format, ///< psMetadataFlag options/flags 634 const char* comment, ///< Comment for metadata item 635 psS8 value ///< Value for metadata item data 636 ); 637 638 639 /** Add a psS16 value to metadata collection. 640 * 641 * @return bool: True for success, False for failure. 642 */ 643 bool psMetadataAddS16( 644 psMetadata* md, ///< Metadata collection to insert metadata item 645 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 646 const char* name, ///< Name of metadata item 647 int format, ///< psMetadataFlag options/flags 648 const char* comment, ///< Comment for metadata item 649 psS16 value ///< Value for metadata item data 650 ); 651 652 653 /** Add a psS32 value to metadata collection. 654 * 655 * @return bool: True for success, False for failure. 656 */ 657 bool psMetadataAddS32( 658 psMetadata* md, ///< Metadata collection to insert metadata item 659 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 660 const char* name, ///< Name of metadata item 661 int format, ///< psMetadataFlag options/flags 662 const char* comment, ///< Comment for metadata item 663 psS32 value ///< Value for metadata item data 664 ); 665 666 667 /** Add a psS64 value to metadata collection. 668 * 669 * @return bool: True for success, False for failure. 670 */ 671 bool psMetadataAddS64( 672 psMetadata* md, ///< Metadata collection to insert metadata item 673 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 674 const char* name, ///< Name of metadata item 675 int format, ///< psMetadataFlag options/flags 676 const char* comment, ///< Comment for metadata item 677 psS64 value ///< Value for metadata item data 678 ); 679 680 681 /** Add a psU8 value to metadata collection. 682 * 683 * @return bool: True for success, False for failure. 684 */ 685 bool psMetadataAddU8( 686 psMetadata* md, ///< Metadata collection to insert metadata item 687 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 688 const char* name, ///< Name of metadata item 689 int format, ///< psMetadataFlag options/flags 690 const char* comment, ///< Comment for metadata item 691 psU8 value ///< Value for metadata item data 692 ); 693 694 695 /** Add a psU16 value to metadata collection. 696 * 697 * @return bool: True for success, False for failure. 698 */ 699 bool psMetadataAddU16( 700 psMetadata* md, ///< Metadata collection to insert metadata item 701 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 702 const char* name, ///< Name of metadata item 703 int format, ///< psMetadataFlag options/flags 704 const char* comment, ///< Comment for metadata item 705 psU16 value ///< Value for metadata item data 706 ); 707 708 709 /** Add a psU32 value to metadata collection. 710 * 711 * @return bool: True for success, False for failure. 712 */ 713 bool psMetadataAddU32( 714 psMetadata* md, ///< Metadata collection to insert metadata item 715 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 716 const char* name, ///< Name of metadata item 717 int format, ///< psMetadataFlag options/flags 718 const char* comment, ///< Comment for metadata item 719 psU32 value ///< Value for metadata item data 720 ); 721 722 723 /** Add a psU64 value to metadata collection. 724 * 725 * @return bool: True for success, False for failure. 726 */ 727 bool psMetadataAddU64( 728 psMetadata* md, ///< Metadata collection to insert metadata item 729 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 730 const char* name, ///< Name of metadata item 731 int format, ///< psMetadataFlag options/flags 732 const char* comment, ///< Comment for metadata item 733 psU64 value ///< Value for metadata item data 734 ); 735 736 737 /** Add a psF32 value to metadata collection. 738 * 739 * @return bool: True for success, False for failure. 740 */ 741 bool psMetadataAddF32( 742 psMetadata* md, ///< Metadata collection to insert metadata item 743 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 744 const char* name, ///< Name of metadata item 745 int format, ///< psMetadataFlag options/flags 746 const char* comment, ///< Comment for metadata item 747 psF32 value ///< Value for metadata item data 748 ); 749 750 751 /** Add a psF64 value to metadata collection. 752 * 753 * @return bool: True for success, False for failure. 754 */ 755 bool psMetadataAddF64( 756 psMetadata* md, ///< Metadata collection to insert metadata item 757 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 758 const char* name, ///< Name of metadata item 759 int format, ///< psMetadataFlag options/flags 760 const char* comment, ///< Comment for metadata item 761 psF64 value ///< Value for metadata item data 762 ); 763 764 765 /** Add a psMaskType value to metadata collection. 766 * 767 * @return bool: True for success, False for failure. 768 */ 769 bool psMetadataAddMask( 770 psMetadata* md, ///< Metadata collection to insert metadata item 771 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 772 const char* name, ///< Name of metadata item 773 int format, ///< psMetadataFlag options/flags 774 const char* comment, ///< Comment for metadata item 775 psMaskType value ///< Value for metadata item data 776 ); 777 778 779 /** Add a psVectorMaskType value to metadata collection. 780 * 781 * @return bool: True for success, False for failure. 782 */ 783 bool psMetadataAddVectorMask( 784 psMetadata* md, ///< Metadata collection to insert metadata item 785 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 786 const char* name, ///< Name of metadata item 787 int format, ///< psMetadataFlag options/flags 788 const char* comment, ///< Comment for metadata item 789 psVectorMaskType value ///< Value for metadata item data 790 ); 791 792 793 /** Add a psImageMaskType value to metadata collection. 794 * 795 * @return bool: True for success, False for failure. 796 */ 797 bool psMetadataAddImageMask( 798 psMetadata* md, ///< Metadata collection to insert metadata item 799 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 800 const char* name, ///< Name of metadata item 801 int format, ///< psMetadataFlag options/flags 802 const char* comment, ///< Comment for metadata item 803 psImageMaskType value ///< Value for metadata item data 804 ); 805 806 807 808 /** Add a psList to metadata collection. 809 * 810 * @return bool: True for success, False for failure. 811 */ 812 bool psMetadataAddList( 813 psMetadata* md, ///< Metadata collection to insert metadata item 814 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 815 const char* name, ///< Name of metadata item 816 int format, ///< psMetadataFlag options/flags 817 const char* comment, ///< Comment for metadata item 818 psList* value ///< psList for metadata item data 819 ); 820 821 822 /** Add a string to metadata collection. 823 * 824 * @return bool: True for success, False for failure. 825 */ 826 bool psMetadataAddStr( 827 psMetadata* md, ///< Metadata collection to insert metadata item 828 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 829 const char* name, ///< Name of metadata item 830 int format, ///< psMetadataFlag options/flags 831 const char* comment, ///< Comment for metadata item 832 const char* value ///< String for metadata item data 833 ); 834 835 836 /** Add a vector to metadata collection. 837 * 838 * @return bool: True for success, False for failure. 839 */ 840 bool psMetadataAddVector( 841 psMetadata* md, ///< Metadata collection to insert metadata item 842 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 843 const char* name, ///< Name of metadata item 844 int format, ///< psMetadataFlag options/flags 845 const char* comment, ///< Comment for metadata item 846 psVector* value ///< Vector for metadata item data 847 ); 848 849 850 /** Add a array to metadata collection. 851 * 852 * @return bool: True for success, False for failure. 853 */ 854 bool psMetadataAddArray( 855 psMetadata* md, ///< Metadata collection to insert metadata item 856 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 857 const char* name, ///< Name of metadata item 858 int format, ///< psMetadataFlag options/flags 859 const char* comment, ///< Comment for metadata item 860 psArray* value ///< Vector for metadata item data 861 ); 862 863 864 /** Add an Image to metadata collection. 865 * 866 * @return bool: True for success, False for failure. 867 */ 868 bool psMetadataAddImage( 869 psMetadata* md, ///< Metadata collection to insert metadata item 870 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 871 const char* name, ///< Name of metadata item 872 int format, ///< psMetadataFlag options/flags 873 const char* comment, ///< Comment for metadata item 874 psImage* value ///< Image for metadata item data 875 ); 876 877 878 /** Add a Time to metadata collection. 879 * 880 * @return bool: True for success, False for failure. 881 */ 882 bool psMetadataAddTime( 883 psMetadata* md, ///< Metadata collection to insert metadata item 884 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 885 const char* name, ///< Name of metadata item 886 int format, ///< psMetadataFlag options/flags 887 const char* comment, ///< Comment for metadata item 888 psTime* value ///< Time for metadata item data 889 ); 890 891 892 /** Add a Hash to metadata collection. 893 * 894 * @return bool: True for success, False for failure. 895 */ 896 bool psMetadataAddHash( 897 psMetadata* md, ///< Metadata collection to insert metadata item 898 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 899 const char* name, ///< Name of metadata item 900 int format, ///< psMetadataFlag options/flags 901 const char* comment, ///< Comment for metadata item 902 psHash* value ///< Hash for metadata item data 903 ); 904 905 906 /** Add a LookupTable to metadata collection. 907 * 908 * @return bool: True for success, False for failure. 909 */ 910 bool psMetadataAddLookupTable( 911 psMetadata* md, ///< Metadata collection to insert metadata item 912 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 913 const char* name, ///< Name of metadata item 914 int format, ///< psMetadataFlag options/flags 915 const char* comment, ///< Comment for metadata item 916 psLookupTable* value ///< LookupTable for metadata item data 917 ); 918 919 920 /** Add an Unknown (psPtr) to metadata collection. 921 * 922 * @return bool: True for success, False for failure. 923 */ 924 bool psMetadataAddUnknown( 925 psMetadata* md, ///< Metadata collection to insert metadata item 926 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 927 const char* name, ///< Name of metadata item 928 int format, ///< psMetadataFlag options/flags 929 const char* comment, ///< Comment for metadata item 930 psPtr value ///< Unknown for metadata item data 931 ); 932 933 934 /** Add a psPtr to metadata collection. 935 * 936 * @return bool: True for success, False for failure. 937 */ 611 #define PS_METADATA_ADD_TYPE_DECL(NAME, TYPE) \ 612 bool psMetadataAdd##NAME( \ 613 psMetadata* md, /* Metadata collection to insert metadata item */ \ 614 long location, /* Index number, PS_LIST_HEAD, or PS_LIST_TAIL */ \ 615 const char* name, /* Name of metadata item */ \ 616 int format, /* psMetadataFlag options/flags */ \ 617 const char* comment, /* Comment for metadata item */ \ 618 TYPE value /* Value for metadata item data */ \ 619 ) 620 621 PS_METADATA_ADD_TYPE_DECL(Bool, psBool); 622 PS_METADATA_ADD_TYPE_DECL(S8, psS8); 623 PS_METADATA_ADD_TYPE_DECL(S16, psS16); 624 PS_METADATA_ADD_TYPE_DECL(S32, psS32); 625 PS_METADATA_ADD_TYPE_DECL(S64, psS64); 626 PS_METADATA_ADD_TYPE_DECL(U8, psU8); 627 PS_METADATA_ADD_TYPE_DECL(U16, psU16); 628 PS_METADATA_ADD_TYPE_DECL(U32, psU32); 629 PS_METADATA_ADD_TYPE_DECL(U64, psU64); 630 PS_METADATA_ADD_TYPE_DECL(F32, psF32); 631 PS_METADATA_ADD_TYPE_DECL(F64, psF64); 632 633 PS_METADATA_ADD_TYPE_DECL(Mask, psMaskType); 634 PS_METADATA_ADD_TYPE_DECL(VectorMask, psVectorMaskType); 635 PS_METADATA_ADD_TYPE_DECL(ImageMask, psImageMaskType); 636 637 PS_METADATA_ADD_TYPE_DECL(List, psList*); 638 PS_METADATA_ADD_TYPE_DECL(Str, const char*); 639 PS_METADATA_ADD_TYPE_DECL(Vector, psVector*); 640 PS_METADATA_ADD_TYPE_DECL(Array, psArray*); 641 PS_METADATA_ADD_TYPE_DECL(Image, psImage*); 642 PS_METADATA_ADD_TYPE_DECL(Time, psTime*); 643 PS_METADATA_ADD_TYPE_DECL(Hash, psHash*); 644 PS_METADATA_ADD_TYPE_DECL(LookupTable, psLookupTable*); 645 PS_METADATA_ADD_TYPE_DECL(Metadata, psMetadata*); 646 PS_METADATA_ADD_TYPE_DECL(Unknown, psPtr); 647 938 648 bool psMetadataAddPtr( 939 649 psMetadata* md, ///< Metadata collection to insert metadata item … … 945 655 ); 946 656 947 948 /** Add Metadata to metadata collection. 949 * 950 * @return bool: True for success, False for failure. 951 */ 952 bool psMetadataAddMetadata( 953 psMetadata* md, ///< Metadata collection to insert metadata item 954 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 955 const char* name, ///< Name of metadata item 956 int format, ///< psMetadataFlag options/flags 957 const char* comment, ///< Comment for metadata item 958 psMetadata* value ///< Metadata for metadata item data 959 ); 960 657 #undef PS_METADATA_ADD_TYPE_DECL 961 658 962 659 /** Removes an item from metadata by key name. … … 994 691 995 692 996 /** Find an item in the metadata collection based on key name and return its double precision value. 997 * 998 * Items may be found in the metadata by providing a key. If the key is 999 * non-unique, the value of the first item is returned. If the item is not 1000 * found, zero is returned. 1001 * 1002 * @return psF64 : Value of metadata item. 1003 */ 1004 psF64 psMetadataLookupF64( 1005 bool *status, ///< Status of lookup. 1006 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1007 const char *key ///< Name of metadata key. 1008 ); 1009 1010 1011 /** Find an item in the metadata collection based on key name and return its single precision value. 1012 * 1013 * Items may be found in the metadata by providing a key. If the key is 1014 * non-unique, the value of the first item is returned. If the item is not 1015 * found, zero is returned. 1016 * 1017 * @return psF32 : Value of metadata item. 1018 */ 1019 psF32 psMetadataLookupF32( 1020 bool *status, ///< Status of lookup. 1021 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1022 const char *key ///< Name of metadata key. 1023 ); 1024 1025 1026 /** Find an item in the metadata collection based on key name and return its integer value. 1027 * 1028 * 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 1030 * found, zero is returned. 1031 * 1032 * @return psS8 : Value of metadata item. 1033 */ 1034 psS8 psMetadataLookupS8( 1035 bool *status, ///< Status of lookup. 1036 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1037 const char *key ///< Name of metadata key. 1038 ); 1039 1040 1041 /** Find an item in the metadata collection based on key name and return its integer value. 1042 * 1043 * Items may be found in the metadata by providing a key. If the key is 1044 * non-unique, the value of the first item is returned. If the item is not 1045 * found, zero is returned. 1046 * 1047 * @return psS16 : Value of metadata item. 1048 */ 1049 psS16 psMetadataLookupS16( 1050 bool *status, ///< Status of lookup. 1051 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1052 const char *key ///< Name of metadata key. 1053 ); 1054 1055 1056 /** Find an item in the metadata collection based on key name and return its integer value. 1057 * 1058 * Items may be found in the metadata by providing a key. If the key is 1059 * non-unique, the value of the first item is returned. If the item is not 1060 * found, zero is returned. 1061 * 1062 * @return psS32 : Value of metadata item. 1063 */ 1064 psS32 psMetadataLookupS32( 1065 bool *status, ///< Status of lookup. 1066 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1067 const char *key ///< Name of metadata key. 1068 ); 1069 1070 1071 /** Find an item in the metadata collection based on key name and return its integer value. 1072 * 1073 * Items may be found in the metadata by providing a key. If the key is 1074 * non-unique, the value of the first item is returned. If the item is not 1075 * found, zero is returned. 1076 * 1077 * @return psS64 : Value of metadata item. 1078 */ 1079 psS64 psMetadataLookupS64( 1080 bool *status, ///< Status of lookup. 1081 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1082 const char *key ///< Name of metadata key. 1083 ); 1084 1085 1086 /** Find an item in the metadata collection based on key name and return its integer value. 1087 * 1088 * Items may be found in the metadata by providing a key. If the key is 1089 * non-unique, the value of the first item is returned. If the item is not 1090 * found, zero is returned. 1091 * 1092 * @return psU8 : Value of metadata item. 1093 */ 1094 psU8 psMetadataLookupU8( 1095 bool *status, ///< Status of lookup. 1096 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1097 const char *key ///< Name of metadata key. 1098 ); 1099 1100 1101 /** Find an item in the metadata collection based on key name and return its integer value. 1102 * 1103 * Items may be found in the metadata by providing a key. If the key is 1104 * non-unique, the value of the first item is returned. If the item is not 1105 * found, zero is returned. 1106 * 1107 * @return psU16 : Value of metadata item. 1108 */ 1109 psU16 psMetadataLookupU16( 1110 bool *status, ///< Status of lookup. 1111 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1112 const char *key ///< Name of metadata key. 1113 ); 1114 1115 1116 /** Find an item in the metadata collection based on key name and return its integer value. 1117 * 1118 * Items may be found in the metadata by providing a key. If the key is 1119 * non-unique, the value of the first item is returned. If the item is not 1120 * found, zero is returned. 1121 * 1122 * @return psU32 : Value of metadata item. 1123 */ 1124 psU32 psMetadataLookupU32( 1125 bool *status, ///< Status of lookup. 1126 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1127 const char *key ///< Name of metadata key. 1128 ); 1129 1130 1131 /** Find an item in the metadata collection based on key name and return its integer value. 1132 * 1133 * Items may be found in the metadata by providing a key. If the key is 1134 * non-unique, the value of the first item is returned. If the item is not 1135 * found, zero is returned. 1136 * 1137 * @return psU64 : Value of metadata item. 1138 */ 1139 psU64 psMetadataLookupU64( 1140 bool *status, ///< Status of lookup. 1141 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1142 const char *key ///< Name of metadata key. 1143 ); 1144 1145 1146 /** Find an item in the metadata collection based on key name and return its integer value. 1147 * 1148 * Items may be found in the metadata by providing a key. If the key is 1149 * non-unique, the value of the first item is returned. If the item is not 1150 * found, zero is returned. 1151 * 1152 * @return psMaskType : Value of metadata item. 1153 */ 1154 psMaskType psMetadataLookupMask( 1155 bool *status, ///< Status of lookup. 1156 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1157 const char *key ///< Name of metadata key. 1158 ); 1159 1160 1161 /** Find an item in the metadata collection based on key name and return its integer value. 1162 * 1163 * Items may be found in the metadata by providing a key. If the key is 1164 * non-unique, the value of the first item is returned. If the item is not 1165 * found, zero is returned. 1166 * 1167 * @return psVectorMaskType : Value of metadata item. 1168 */ 1169 psVectorMaskType psMetadataLookupVectorMask( 1170 bool *status, ///< Status of lookup. 1171 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1172 const char *key ///< Name of metadata key. 1173 ); 1174 1175 1176 /** Find an item in the metadata collection based on key name and return its integer value. 1177 * 1178 * Items may be found in the metadata by providing a key. If the key is 1179 * non-unique, the value of the first item is returned. If the item is not 1180 * found, zero is returned. 1181 * 1182 * @return psImageMaskType : Value of metadata item. 1183 */ 1184 psImageMaskType psMetadataLookupImageMask( 1185 bool *status, ///< Status of lookup. 1186 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1187 const char *key ///< Name of metadata key. 1188 ); 1189 1190 1191 /** Find an item in the metadata collection based on key name and return its boolean value. 1192 * 1193 * Items may be found in the metadata by providing a key. If the key is 1194 * non-unique, the value of the first item is returned. If the item is not 1195 * found, zero is returned. 1196 * 1197 * @return bool : Value of metadata item. 1198 */ 1199 bool psMetadataLookupBool( 1200 bool *status, ///< Status of lookup. 1201 const psMetadata *md, ///< Metadata collection to lookup metadata item. 1202 const char *key ///< Name of metadata key. 1203 ); 1204 1205 1206 /** Find an item in the metadata collection based on key name and return its integer value. 1207 * 1208 * Items may be found in the metadata by providing a key. If the key is 1209 * non-unique, the value of the first item is returned. If the item is not 1210 * found, zero is returned. 1211 * 1212 * @return void* : Value of metadata item. 1213 */ 1214 psPtr psMetadataLookupPtr( 1215 bool *status, ///< Status of lookup. 1216 const psMetadata* md, ///< Metadata collection to lookup metadata item. 1217 const char *key ///< Name of metadata key. 1218 ); 1219 693 #define PS_METADATA_LOOKUP_TYPE_DECL(NAME, TYPE) \ 694 TYPE psMetadataLookup##NAME( \ 695 bool *status, /* Status of lookup */ \ 696 const psMetadata *md, /* Metadata collection to lookup metadata item */ \ 697 const char *key /* Name of metadata key */ \ 698 ); 699 700 PS_METADATA_LOOKUP_TYPE_DECL(Bool, psBool); 701 PS_METADATA_LOOKUP_TYPE_DECL(S8, psS8); 702 PS_METADATA_LOOKUP_TYPE_DECL(S16, psS16); 703 PS_METADATA_LOOKUP_TYPE_DECL(S32, psS32); 704 PS_METADATA_LOOKUP_TYPE_DECL(S64, psS64); 705 PS_METADATA_LOOKUP_TYPE_DECL(U8, psU8); 706 PS_METADATA_LOOKUP_TYPE_DECL(U16, psU16); 707 PS_METADATA_LOOKUP_TYPE_DECL(U32, psU32); 708 PS_METADATA_LOOKUP_TYPE_DECL(U64, psU64); 709 PS_METADATA_LOOKUP_TYPE_DECL(F32, psF32); 710 PS_METADATA_LOOKUP_TYPE_DECL(F64, psF64); 711 712 PS_METADATA_LOOKUP_TYPE_DECL(Mask, psMaskType); 713 PS_METADATA_LOOKUP_TYPE_DECL(VectorMask, psVectorMaskType); 714 PS_METADATA_LOOKUP_TYPE_DECL(ImageMask, psImageMaskType); 715 716 PS_METADATA_LOOKUP_TYPE_DECL(Ptr, psPtr); 717 PS_METADATA_LOOKUP_TYPE_DECL(Str, psString); 718 PS_METADATA_LOOKUP_TYPE_DECL(Metadata, psMetadata*); 719 PS_METADATA_LOOKUP_TYPE_DECL(Time, psTime*); 720 721 #undef PS_METADATA_LOOKUP_TYPE_DECL 1220 722 1221 723 /** Find an item in the metadata collection based on list index. … … 1298 800 1299 801 1300 /** Find an item in the metadata collection based on key name and return its metadata value.1301 *1302 * Items may be found in the metadata by providing a key. If the key is1303 * non-unique, the value of the first item is returned. If the item is not1304 * found, zero is returned.1305 *1306 * @return psMetadata*: Value of metadata item.1307 */1308 psMetadata *psMetadataLookupMetadata(1309 bool *status, ///< Status of lookup.1310 const psMetadata *md, ///< Metadata collection to lookup metadata item.1311 const char *key ///< Name of metadata key.1312 );1313 1314 1315 /** Find an item in the metadata collection based on key name and return its string value.1316 *1317 * Items may be found in the metadata by providing a key. If the key is1318 * non-unique, the value of the first item is returned. If the item is not1319 * found, zero is returned.1320 *1321 * @return psString: Value of metadata item.1322 */1323 psString psMetadataLookupStr(1324 bool *status, ///< Status of lookup.1325 const psMetadata *md, ///< Metadata collection to lookup metadata item.1326 const char *key ///< Name of metadata key.1327 );1328 1329 1330 /** Find an item in the metadata collection based on key name and return it as a psTime pointer.1331 *1332 * Items may be found in the metadata by providing a key. If the key is1333 * non-unique, the value of the first item is returned. If the item is not1334 * found, zero is returned.1335 *1336 * @return psTime: Value of metadata item.1337 */1338 1339 psTime *psMetadataLookupTime(1340 bool *status, ///< Status of lookup.1341 const psMetadata *md, ///< Metadata collection to lookup metadata item.1342 const char *key ///< Name of metadata key.1343 );1344 1345 802 /// Return a list of keys for a metadata 1346 803 psList *psMetadataKeys(psMetadata *md ///< Metadata for which to return keys
Note:
See TracChangeset
for help on using the changeset viewer.
