本文整理汇总了C++中SmartPointer::GetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ SmartPointer::GetValue方法的具体用法?C++ SmartPointer::GetValue怎么用?C++ SmartPointer::GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmartPointer
的用法示例。
在下文中一共展示了SmartPointer::GetValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SessionWrapper
void
InverseSearchOptionsPage::CollectEditors ()
{
string program;
string arguments;
/// free editors
if (MakeXEmacsCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("XEmacs"), program, arguments));
}
if (MakeNTEmacsCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("NTEmacs"), program, arguments));
}
if (MakeNTEmacsClientCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("NTEmacs (Single Instance)"),
program,
arguments));
}
if (MakeTeXnicCenterCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("TeXnicCenter"), program, arguments));
}
if (MakeVisualTeXCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("Visual TeX"), program, arguments));
}
/// non-free editors
if (MakeWinEdtCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("WinEdt"), program, arguments));
}
if (MakeLaTeXMngCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("LaTeXMng"), program, arguments));
}
if (MakeWinTeXXPCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("WinTeX XP"), program, arguments));
}
if (MakeWinShellCommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("WinShell"), program, arguments));
}
if (MakeLaTeXWIDECommandLine(program, arguments))
{
editors.push_back (EditorInfo(T_("LaTeX WIDE"), program, arguments));
}
/// user-defined
firstCustomIdx = static_cast<int>(editors.size());
for (unsigned r = SessionWrapper(true)->GetNumberOfTEXMFRoots();
r > 0;
-- r)
{
PathName editorsIni = SessionWrapper(true)->GetRootDirectory(r - 1);
editorsIni += MIKTEX_PATH_EDITORS_INI;
if (File::Exists(editorsIni))
{
SmartPointer<Cfg> pCfg (Cfg::Create());
pCfg->Read (editorsIni);
char szName[BufferSizes::MaxCfgName];
for (char * lpszName =
pCfg->FirstKey(szName, BufferSizes::MaxCfgName);
lpszName != 0;
lpszName = pCfg->NextKey(szName, BufferSizes::MaxCfgName))
{
editors.push_back
(EditorInfo(lpszName,
pCfg->GetValue(lpszName, T_("program")),
pCfg->GetValue(lpszName, T_("arguments"))));
}
}
}
}
示例2: if
BOOL
SetupWizard::OnInitDialog ()
{
BOOL ret = CPropertySheet::OnInitDialog();
try
{
SetIcon (AfxGetApp()->LoadIcon(IDR_MAINFRAME), TRUE);
CStringW title;
if (theApp.isMiKTeXDirect)
{
title.Format (T_(_T("MiKTeX %s Setup (%d-bit)")),
static_cast<LPCTSTR>(UW_(MIKTEX_FULL_VERSION_STR)),
static_cast<int>(sizeof(void*)) * 8);
}
else if (theApp.pSetupService->GetOptions().IsPrefabricated)
{
PathName configFile (theApp.GetLocalPackageRepository());
configFile += "pr.ini";
SmartPointer<Cfg> pConfig (Cfg::Create());
pConfig->Read (configFile);
CString prefix;
CString version (MIKTEXTEXT(MIKTEX_SERIES_STR));
version += MIKTEXTEXT('.');
version += UT_(pConfig->GetValue("repository", "version").c_str());
switch (theApp.GetPackageLevel().Get())
{
case PackageLevel::Essential:
prefix = T_("Essential ");
break;
case PackageLevel::Basic:
prefix = T_("Basic ");
break;
case PackageLevel::Complete:
prefix = "";
break;
default:
MIKTEX_ASSERT (false);
__assume (false);
break;
}
title.Format (T_(_T("%sMiKTeX %s Installer (%d-bit)")),
static_cast<LPCTSTR>(prefix),
static_cast<LPCTSTR>(version),
static_cast<int>(sizeof(void*)) * 8);
}
else
{
title.Format (T_(_T("MiKTeX %s Net Installer (%d-bit)")),
static_cast<LPCTSTR>(UW_(MIKTEX_VERSION_STR)),
static_cast<int>(sizeof(void*)) * 8);
}
SetTitle (title);
SetActivePage (&m_License);
}
catch (const MiKTeXException & e)
{
ReportError (e);
}
catch (const exception & e)
{
ReportError (e);
}
return (ret);
}