tpVariant类
Utils
2025-07-05
介绍
泛类型
基础信息
头文件: | include <tpVariant.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | |
派生类: |
Public 类型
enum VariantType {
tpEmpty = 0, tpBool = 1, tpInt4 = 2,
tpUint4 = 3, tpInt8 = 4, tpUint8 = 5,
tpReal4 = 6, tpReal8 = 7, tpBstr = 8,
tpRect, tpSize, tpPoint,
tpSet
}
Public 成员函数
tpVariant() | ||
---|---|---|
tpVariant(bool bValue) | ||
tpVariant(int32_t nValue) | ||
tpVariant(uint32_t uValue) | ||
tpVariant(int64_t nValue) | ||
tpVariant(uint64_t uValue) | ||
tpVariant(float fValue) | ||
tpVariant(double dValue) | ||
tpVariant(const char *pChar) | ||
tpVariant(const std::string &strChar) | ||
tpVariant(const ItpRect &value) | ||
tpVariant(const ItpSize &value) | ||
tpVariant(const ItpPoint &value) | ||
tpVariant(const std::vector< bool > &valueVector) | ||
tpVariant(const std::vector< int32_t > &valueVector) | ||
tpVariant(const std::vector< uint32_t > &valueVector) | ||
tpVariant(const std::vector< int64_t > &valueVector) | ||
tpVariant(const std::vector< uint64_t > &valueVector) | ||
tpVariant(const std::vector< float > &valueVector) | ||
tpVariant(const std::vector< double > &valueVector) | ||
tpVariant(const std::vector< std::string > &valueVector) | ||
tpVariant(const std::set< bool > &valueSet) | ||
tpVariant(const std::set< int32_t > &valueSet) | ||
tpVariant(const std::set< uint32_t > &valueSet) | ||
tpVariant(const std::set< int64_t > &valueSet) | ||
tpVariant(const std::set< uint64_t > &valueSet) | ||
tpVariant(const std::set< float > &valueSet) | ||
tpVariant(const std::set< double > &valueSet) | ||
tpVariant(const std::set< std::string > &valueSet) | ||
tpVariant(const VariantValue &value) | ||
tpVariant(const tpVariant &other) | ||
isNull() | ||
tpVariant & tpVariant::operator= | operator=(bool bValue) | |
tpVariant & tpVariant::operator= | operator=(int32_t nValue) | |
tpVariant & tpVariant::operator= | operator=(uint32_t uValue) | |
tpVariant & tpVariant::operator= | operator=(int64_t nValue) | |
tpVariant & tpVariant::operator= | operator=(uint64_t uValue) | |
tpVariant & tpVariant::operator= | operator=(float fValue) | |
tpVariant & tpVariant::operator= | operator=(double dValue) | |
tpVariant & tpVariant::operator= | operator=(ItpRect value) | |
tpVariant & tpVariant::operator= | operator=(ItpSize value) | |
tpVariant & tpVariant::operator= | operator=(ItpPoint value) | |
tpVariant & tpVariant::operator= | operator=(const char *pChar) | |
tpVariant & tpVariant::operator= | operator=(const std::string &strChar) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< bool > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< int32_t > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< uint32_t > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< int64_t > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< uint64_t > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< float > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< double > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::vector< std::string > &valueVector) | |
tpVariant & tpVariant::operator= | operator=(const std::set< bool > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const std::set< int32_t > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const std::set< uint32_t > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const std::set< int64_t > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const std::set< uint64_t > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const std::set< float > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const std::set< double > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const std::set< std::string > &valueSet) | |
tpVariant & tpVariant::operator= | operator=(const VariantValue &value) | |
tpVariant & tpVariant::operator= | operator=(const tpVariant &other) | |
operator==(const tpVariant &value) | ||
operator!=(const VariantValue &value) | ||
operator!=(const tpVariant &value) | ||
operator bool() const | ||
operator int32_t() const | ||
operator uint32_t() const | ||
operator int64_t() const | ||
operator uint64_t() const | ||
operator float() const | ||
operator double() const | ||
operator const char *() const | ||
operator tpString() const | ||
operator ItpRect() const | ||
operator ItpSize() const | ||
operator ItpPoint() const | ||
isBool() const | ||
isInt32() const | ||
isUint32() const | ||
isInt64() const | ||
isUint64() const | ||
isFloat() const | ||
isDouble() const | ||
isConstChar() const | ||
isString() const | ||
isRect() const | ||
isSize() const | ||
isPoint() const | ||
toBool(const bool &defaultValue=false) const | ||
toInt32(const int32_t &defaultValue=0) const | ||
toUInt32(const uint32_t &defaultValue=0) const | ||
toInt64(const int64_t &defaultValue=0) const | ||
toUint64(const uint64_t &defaultValue=0) const | ||
toFloat(const float &defaultValue=0) const | ||
toDouble(const double &defaultValue=0) const | ||
tpString | toString(const tpString &defaultValue="") const | |
toRect(const ItpRect &defaultValue=ItpRect()) const | ||
toSize(const ItpSize &defaultValue=ItpSize()) const | ||
toPoint(const ItpPoint &defaultValue=ItpPoint()) const | ||
ToBoolArray() const | ||
ToInt32Array() const | ||
ToUint32Array() const | ||
ToInt64Array() const | ||
ToUint64Array() const | ||
ToFloatArray() const | ||
ToDoubleArray() const | ||
ToStringArray() const | ||
ToBoolSet() | ||
ToInt32Set() | ||
ToUint32Set() | ||
ToInt64Set() | ||
ToUint64Set() | ||
ToFloatSet() | ||
ToDoubleSet() | ||
ToStringSet() |
成员枚举类型说明
enum tpVariant::VariantType
名称 | 值 | 描述 |
---|---|---|
tpEmpty | 0 | 类型为定义 |
tpBool | 1 | bool类型 |
tpInt4 | 2 | int32_t 类型 |
tpUint4 | 3 | uint32_t 类型 |
tpInt8 | 4 | int64_t 类型 |
tpUint8 | 5 | uint64_t 类型 |
tpReal4 | 6 | float 类型 |
tpReal8 | 7 | double 类型 |
tpBstr | 8 | const char* 类型 |
tpRect | 9 | |
tpSize | 10 | |
tpPoint | 11 | |
tpSet | 1 << 8 |