本文整理汇总了C++中VString::GetLong方法的典型用法代码示例。如果您正苦于以下问题:C++ VString::GetLong方法的具体用法?C++ VString::GetLong怎么用?C++ VString::GetLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VString
的用法示例。
在下文中一共展示了VString::GetLong方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetAttribute
void VLocalizationGroupHandler::SetAttribute(const VString& inName, const VString& inValue)
{
if (fGroupBag == NULL)
fGroupBag = new VValueBag;
if (inName.EqualToUSASCIICString( "id"))
{
sLONG idValue = inValue.GetLong();
if (idValue != 0)
fGroupID = idValue;
//else
//DebugMsg( "VLocalizationGroupHandler::Non-valid group id Value : %S\n", &inValue);
}
else if (inName.EqualToUSASCIICString( "resname"))
{
if (!inValue.IsEmpty())
{
fGroupResnamesStack.top() = inValue;
}
}
else if (inName.EqualToUSASCIICString( "restype"))
{
xbox_assert( fGroupRestype.IsEmpty() ); // no nested group
fGroupRestype = inValue;
}
if (fGroupBag != NULL)
fGroupBag->SetAttribute( inName, inValue);
}
示例2: GetChangeListNumber
/*
IMPORTANT: the build version is created on the compilation machine. It requires that (1) perl is installed and (2) an external file contains the number.
That's why if you compile 4D on your computer, you'll probably always get a build version of 0 (if the external file is not found, "00000" is used)
*/
sLONG VProcess::GetChangeListNumber() const
{
sLONG changeListNumber = 0;
VString s;
GetBuildNumber( s);
VIndex pos = s.FindUniChar( '.', s.GetLength(), true);
if (pos > 0)
{
s.SubString( pos + 1, s.GetLength() - pos);
changeListNumber = s.GetLong();
}
return changeListNumber;
}
示例3: SetHTMLAttribute
void VSpanHandler::SetHTMLAttribute(const VString& inName, const VString& inValue)
{
//here we need to parse only mandatory font attributes
if (inName.EqualToString("face"))
SetFont(inValue);
else if (inName.EqualToString("color"))
SetColor( inValue);
else if (inName.EqualToString("bgcolor"))
SetBackgroundColor( inValue);
else if (inName.EqualToString("size"))
{
//HTML font size is a number from 1 to 7; default is 3
sLONG size = inValue.GetLong();
if (size >= 1 && size <= 7)
{
size = size*12/3; //convert to point
VString fontSize;
fontSize.FromLong(size);
SetFontSize( fontSize, 72.0f);
}
}
}