本文整理汇总了C++中Var::Get方法的典型用法代码示例。如果您正苦于以下问题:C++ Var::Get方法的具体用法?C++ Var::Get怎么用?C++ Var::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Var
的用法示例。
在下文中一共展示了Var::Get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ahkgetvar
// Naveen: v1. ahkgetvar()
EXPORT LPTSTR ahkgetvar(LPTSTR name,unsigned int getVar)
{
Var *ahkvar = g_script.FindOrAddVar(name);
if (getVar != NULL)
{
if (ahkvar->mType == VAR_BUILTIN)
return _T("");
result_to_return_dll = (LPTSTR )realloc((LPTSTR )result_to_return_dll,MAX_INTEGER_LENGTH);
return ITOA64((int)ahkvar,result_to_return_dll);
}
if (!ahkvar->HasContents() && ahkvar->mType != VAR_BUILTIN )
return _T("");
if (*ahkvar->mCharContents == '\0')
{
result_to_return_dll = (LPTSTR )realloc((LPTSTR )result_to_return_dll,(ahkvar->mByteCapacity ? ahkvar->mByteCapacity : ahkvar->mByteLength) + MAX_NUMBER_LENGTH + 1);
if ( ahkvar->mType == VAR_BUILTIN )
ahkvar->mBIV(result_to_return_dll,name); //Hotkeyit
else if ( ahkvar->mType == VAR_ALIAS )
ITOA64(ahkvar->mAliasFor->mContentsInt64,result_to_return_dll);
else if ( ahkvar->mType == VAR_NORMAL )
ITOA64(ahkvar->mContentsInt64,result_to_return_dll);//Hotkeyit
}
else
{
result_to_return_dll = (LPTSTR )realloc((LPTSTR )result_to_return_dll,ahkvar->mByteLength+1);
if ( ahkvar->mType == VAR_ALIAS )
ahkvar->mAliasFor->Get(result_to_return_dll); //Hotkeyit removed ebiv.cpp and made ahkgetvar return all vars
else if ( ahkvar->mType == VAR_NORMAL )
ahkvar->Get(result_to_return_dll); // var.getText() added in V1.
else if ( ahkvar->mType == VAR_BUILTIN )
ahkvar->mBIV(result_to_return_dll,name); //Hotkeyit
}
return result_to_return_dll;
}
示例2: ahkgetvar
// Naveen: v1. ahkgetvar()
EXPORT VarSizeType ahkgetvar(char *name, char *output)
{
Var *ahkvar = g_script.FindOrAddVar(name);
return ahkvar->Get(output); // var.getText() added in V1.
}