diff options
Diffstat (limited to 'CPP/Windows/PropVariantUtils.h')
-rw-r--r--[-rwxr-xr-x] | CPP/Windows/PropVariantUtils.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/CPP/Windows/PropVariantUtils.h b/CPP/Windows/PropVariantUtils.h index 5582aaff..c9946144 100755..100644 --- a/CPP/Windows/PropVariantUtils.h +++ b/CPP/Windows/PropVariantUtils.h @@ -3,7 +3,8 @@ #ifndef __PROP_VARIANT_UTILS_H #define __PROP_VARIANT_UTILS_H -#include "Common/MyString.h" +#include "../Common/MyString.h" + #include "PropVariant.h" struct CUInt32PCharPair @@ -12,18 +13,18 @@ struct CUInt32PCharPair const char *Name; }; -void StringToProp(const AString &s, NWindows::NCOM::CPropVariant &prop); AString TypePairToString(const CUInt32PCharPair *pairs, unsigned num, UInt32 value); void PairToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 value, NWindows::NCOM::CPropVariant &prop); +AString FlagsToString(const char **names, unsigned num, UInt32 flags); AString FlagsToString(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags); void FlagsToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags, NWindows::NCOM::CPropVariant &prop); AString TypeToString(const char *table[], unsigned num, UInt32 value); void TypeToProp(const char *table[], unsigned num, UInt32 value, NWindows::NCOM::CPropVariant &prop); -#define PAIR_TO_PROP(pairs, value, prop) PairToProp(pairs, sizeof(pairs) / sizeof(pairs[0]), value, prop) -#define FLAGS_TO_PROP(pairs, value, prop) FlagsToProp(pairs, sizeof(pairs) / sizeof(pairs[0]), value, prop) -#define TYPE_TO_PROP(table, value, prop) TypeToProp(table, sizeof(table) / sizeof(table[0]), value, prop) +#define PAIR_TO_PROP(pairs, value, prop) PairToProp(pairs, ARRAY_SIZE(pairs), value, prop) +#define FLAGS_TO_PROP(pairs, value, prop) FlagsToProp(pairs, ARRAY_SIZE(pairs), value, prop) +#define TYPE_TO_PROP(table, value, prop) TypeToProp(table, ARRAY_SIZE(table), value, prop) #endif |