本文整理汇总了C++中std::_tstring类的典型用法代码示例。如果您正苦于以下问题:C++ _tstring类的具体用法?C++ _tstring怎么用?C++ _tstring使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了_tstring类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Get
_variant_t Get(const std::_tstring & section, const std::_tstring & label, const _variant_t & defaultVal)
{
clib::recursive_mutex::scoped_lock proc(m_mutex);
SectionLabelDefault sl(SectionLabel(section, label), defaultVal);
ConfigCacheT::const_iterator found = m_cache.find(sl.first);
if(sl == GLOBAL_USER && found != m_cache.end())
if (!CString(m_cache[sl.first]).IsEmpty())
return m_cache[sl.first];
if(sl == GLOBAL_PASSWORD && found != m_cache.end())
if (!CString(m_cache[sl.first]).IsEmpty())
return m_cache[sl.first];
if (!m_CfgPath.empty())
{
if (found != m_cache.end())
return found->second;
CString _defaultVal = defaultVal, _val;
if (!m_Cfg.GetString(section.c_str(), label.c_str(), _val, _defaultVal))
{
//ATLTRACE(_T("GetString(%s,%s,Err=%x)\r\n"), section, label, ::GetLastError() );
_val = _defaultVal;
}
SectionLabel id(section, label);
if (CString(m_cache[id]).CompareNoCase(_val) != 0)
{
m_cache[id] = _val;
_variant_t retVal = m_cache[sl.first];
proc.unlock();
on_refresh(&id);
return retVal;
}
}
return m_cache[sl.first];
}
示例2: TextCompare
// ===========================================================================
void TextCompare(const std::_tstring & base, const std::_tstring & comp, CLineVector & baseResult, CLineVector & compResult)
{
if (base.length() == 0 && comp.length() == 0)
return;
CTable baseTable(base);
CTable compTable(comp);
CAnchors compare(baseTable, compTable, 1);
compare.GetPaddedResults(baseResult, compResult);
}
示例3: ShowDiff
void CMainFrame::ShowDiff(const std::_tstring & lhs, const std::_tstring & lhsHeader, const std::_tstring & rhs, const std::_tstring & rhsHeader)
{
m_sourceEclView.SetReadOnly(false);
m_sourceEclView.SetText(lhs.c_str());
m_sourceEclView.SetReadOnly(true);
m_targetEclView.SetReadOnly(false);
m_targetEclView.SetText(rhs.c_str());
m_targetEclView.SetReadOnly(true);
m_diffView.SetText(lhs, rhs);
}
示例4: MessageBox
bool MessageBox(HWND hwnd, std::_tstring &error_title, std::_tstring &error_msg)
{
if (m_errExists)
{
if (::MessageBox(hwnd, error_title.c_str(), error_msg.c_str(), MB_ICONASTERISK | MB_YESNO) == IDYES)
return true;
m_errExists = false;
}
else
::MessageBox(hwnd, error_title.c_str(), error_msg.c_str(), MB_ICONASTERISK);
return false;
}
示例5: InitConfigPath
void InitConfigPath(const std::_tstring & cfgName, const std::_tstring & ext)
{
clib::recursive_mutex::scoped_lock proc(m_mutex);
m_CfgName = cfgName;
ATLASSERT((cfgName.find('.') == std::_tstring::npos));
ATLASSERT((ext.find('.') == std::_tstring::npos));
std::_tstring cfgNameExt = cfgName;
cfgNameExt += _T(".");
cfgNameExt += ext;
boost::filesystem::path appFolder;
m_CfgPath = GetApplicationFolder(appFolder) / stringToPath(cfgNameExt);
m_Cfg.SetFilename(pathToWString(m_CfgPath).c_str());
}
示例6: threadLoadAttribute
static void threadLoadAttribute(CWorkspaceItem * self, std::_tstring moduleLabel, std::_tstring attributeLabel, std::_tstring attributeType)
{
self->m_loaded = LOADING_STARTED;
CComPtr<IAttribute> attribute = NULL;
if (!moduleLabel.empty() && !attributeLabel.empty())
{
attribute = self->m_repository->GetAttributeFast(moduleLabel.c_str(), attributeLabel.c_str(), CreateIAttributeType(attributeType), 0, true, true, true);
if (!attribute)
attribute = self->m_repository->GetAttributePlaceholder(moduleLabel.c_str(), attributeLabel.c_str(), CreateIAttributeType(attributeType));
}
self->SetAttr(attribute);
self->m_loaded = LOADING_FINISHED;
}
示例7: SetTabData
void CDockableDataViews::SetTabData(const std::_tstring & label, const ITable * data, bool hasRowNum, const roxie::CSearchRowVector & searchResults)
{
StringResultMap::iterator itr = m_dataTabs.find(label);
if (itr == m_dataTabs.end())
{
m_dataTabs[label] = new CDataView();
m_dataTabs[label]->Create(NULL, label.c_str(), WS_CHILD | WS_VISIBLE, CRect(0, 0, 0, 0), &m_wndTab, 1);
m_dataTabs[label]->SetFont(&afxGlobalData.fontRegular);
m_wndTab.InsertTab(m_dataTabs[label], label.c_str(), 0, 0, FALSE);
}
m_dataTabs[label]->SetData(data, hasRowNum, searchResults);
ActivateTab(m_dataTabs[label]);
}
示例8: SetTabPropertyGrid
void CDockablePropertyGridViews::SetTabPropertyGrid(const std::_tstring & label, const ITable* data)
{
StringPropertyGridMap::const_iterator itr = m_propertyGridTabs.find(label);
if (itr == m_propertyGridTabs.end())
{
bool edges = boost::algorithm::iequals(label, _T("edges"));
StlLinked<CPropertyGridView> propertyGridView = new CPropertyGridView(edges ? XGMML_CAT_EDGE : XGMML_CAT_VERTEX);
m_propertyGridTabs[label] = propertyGridView.get();
propertyGridView->Create(NULL, label.c_str(), WS_CHILD | WS_VISIBLE, CRect(0, 0, 0, 0), &m_wndTab, 1);
propertyGridView->SetFont(&afxGlobalData.fontRegular);
m_wndTab.AddTab(propertyGridView, label.c_str(), 0, FALSE);
propertyGridView->SetOwner(m_owner);
}
m_propertyGridTabs[label]->SetData(data);
}
示例9: CalcType
static WORKSPACE_ITEM_TYPE CalcType(const std::_tstring & type)
{
if (type.compare(PERSISTVAL_BUILDER) == 0)
{
return WORKSPACE_ITEM_BUILDER;
}
else if (type.compare(PERSISTVAL_ATTRIBUTE) == 0)
{
return WORKSPACE_ITEM_ATTRIBUTE;
}
else if (type.compare(PERSISTVAL_GRAPH) == 0)
{
return WORKSPACE_ITEM_GRAPH;
}
return WORKSPACE_ITEM_UNKNOWN;
}
示例10: Update
void Update(const std::_tstring &cluster, const std::_tstring &status, const std::vector<ns4__ActiveWorkunit *> &running)
{
clib::recursive_mutex::scoped_lock proc(m_mutex);
m_cluster = cluster.c_str();
m_queue.clear();
m_status = status.c_str();
for(std::size_t i = 0; i < running.size(); ++i)
{
if (running[i]->Instance && m_cluster.CompareNoCase(running[i]->Instance->c_str()) == 0)
{
// Creating a workunit can cause a deadlock with the active tree, so set noBroadcast to true.
CComPtr<Dali::IWorkunit> wu = Dali::CreateWorkunit(GetIConfig(QUERYBUILDER_CFG)->Get(GLOBAL_SERVER_WORKUNIT), _T("Dali"), running[i], true);
ATLASSERT(wu);
m_queue.push_back(wu.p);
}
}
}
示例11: Update
void Update(const std::_tstring & name, ITable * result)
{
clib::recursive_mutex::scoped_lock proc(m_mutex);
m_name = name.c_str();
m_result->LoadFrom(result);
m_total = result->GetRowCount();
}
示例12: ShowEcl
void ShowEcl(const std::_tstring & searchTerm, FINDMODE findmode)
{
m_tabbedChildWindow.GetTabCtrl().SetCurSel(0);
if (searchTerm.length())
{
int flags = 0;
m_dlgview.GetView().DoFind(searchTerm, flags, findmode, true);
}
}
示例13: parse_line
void CTable::parse_line(const std::_tstring & table)
{
for(std::size_t i = 0; i < table.size(); ++i)
{
std::_tstring tchar;
tchar.resize(1, table[i]);
m_rows.push_back(CLine(tchar));
}
}
示例14: CWorkspaceItem
CWorkspaceItem(IRepository * repository, const std::_tstring & data)
{
clib::recursive_mutex::scoped_lock proc(m_mutex);
m_repository = repository;
m_props.deserializeXML(data.c_str());
m_id = m_props.Get(PERSIST_FILEPATH);
UpdateID();
m_attributeLoaded = false;
m_workunitLoaded = false;
m_loaded = LOADING_UNKNOWN;
}
示例15: _T
std::_tstring CBookmarksView::FindTag(std::_tstring str, std::_tstring tag, int &index) {
std::_tstring tagEnd = _T("</") + tag + _T(">");
std::_tstring foundStr = _T("");
tag = _T("<") + tag + _T(">");
int n = static_cast<int>(str.find(tag, index));
if (n >= 0)
{
int tagLen = tag.length();
int indexEnd = static_cast<int>(str.find(tagEnd, index));
foundStr = str.substr(n + tagLen, indexEnd - n - tagLen);
index = indexEnd + tagEnd.length() + 1;
}
else
{
index = -1;
foundStr = _T("");
}
return foundStr;
}