本文整理汇总了C++中plString::startsWith方法的典型用法代码示例。如果您正苦于以下问题:C++ plString::startsWith方法的具体用法?C++ plString::startsWith怎么用?C++ plString::startsWith使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plString
的用法示例。
在下文中一共展示了plString::startsWith方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTypeFromString
plVarDescriptor::Type plVarDescriptor::GetTypeFromString(const plString& type, bool isEoa) {
plString itype = type.toLower();
if (isEoa) {
// These translate differently in Myst5...
if (itype == "bool")
return kBool;
else if (itype == "char")
return kChar;
else if (itype == "byte")
return kByte;
else if (itype == "int")
return kInt;
else if (itype == "uint")
return kUint;
else if (itype == "float")
return kFloat;
else if (itype == "double")
return kDouble;
else if (itype == "string")
return kString;
else if (itype == "time")
return kTime;
else if (itype == "uoid")
return kKey;
else if (itype == "vector3")
return kVector3;
else if (itype == "point3")
return kPoint3;
else if (itype == "quaternion")
return kQuaternion;
else if (itype == "matrix44")
return kMatrix44;
else if (itype == "rgba")
return kRGBA;
else if (itype == "buffer")
return kBuffer;
else if (itype == "agetimeofday")
return kAgeTimeOfDay;
else if (itype == "agetimeelapsed")
return kAgeTimeElapsed;
else if (itype == "gametimeelapsed")
return kGameTimeElapsed;
else
return kStateDescriptor;
} else {
if (type.startsWith("$"))
return kStateDescriptor;
else if (itype == "int")
return kInt;
else if (itype == "float")
return kFloat;
else if (itype == "bool")
return kBool;
else if (itype == "string32")
return kString;
else if (itype == "plkey")
return kKey;
else if (itype == "creatable" || itype == "message")
return kCreatable;
else if (itype == "double")
return kDouble;
else if (itype == "time")
return kTime;
else if (itype == "byte")
return kByte;
else if (itype == "short")
return kShort;
else if (itype == "agetimeofday")
return kAgeTimeOfDay;
else if (itype == "vector3")
return kVector3;
else if (itype == "point3")
return kPoint3;
else if (itype == "rgb")
return kRGB;
else if (itype == "rgba")
return kRGBA;
else if (itype == "quat" || itype == "quaternion")
return kQuaternion;
else if (itype == "rgb8")
return kRGB8;
else if (itype == "rgba8")
return kRGBA8;
else
return kNone;
}
}