本文整理汇总了C++中std::_tstring类的典型用法代码示例。如果您正苦于以下问题:C++ _tstring类的具体用法?C++ _tstring怎么用?C++ _tstring使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了_tstring类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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];
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:35,代码来源:global.cpp
示例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);
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:11,代码来源:TextCompare.cpp
示例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);
}
开发者ID:dehilsterlexis,项目名称:eclide,代码行数:11,代码来源:MainFrm2.cpp
示例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;
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:12,代码来源:InsAttrDlg.cpp
示例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());
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:13,代码来源:global.cpp
示例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;
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:13,代码来源:WorkspaceItem.cpp
示例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]);
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:13,代码来源:DockableDataViews.cpp
示例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);
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:15,代码来源:DockablePropertyGridViews.cpp
示例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;
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:16,代码来源:WorkspaceItem.cpp
示例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);
}
}
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:17,代码来源:SMCCluster.cpp
示例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();
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:9,代码来源:LocalResult.cpp
示例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);
}
}
开发者ID:dehilsterlexis,项目名称:eclide,代码行数:9,代码来源:ChildAttributeFrame.cpp
示例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));
}
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:9,代码来源:TextCompare.cpp
示例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;
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:11,代码来源:WorkspaceItem.cpp
示例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;
}
开发者ID:drealeed,项目名称:eclide,代码行数:20,代码来源:BookmarksView.cpp
示例16: hash_string
void CLine::hash_string(const std::_tstring & s)
{
// Calc Hash
boost::crc_32_type computer;
computer.reset();
computer.process_bytes(s.c_str(), sizeof(TCHAR) * s.length());
m_hash = computer.checksum();
// Calc Anchor Hash
bool prevIsGraph = true;
static boost::crc_32_type anchorComputer;
anchorComputer.reset();
for (unsigned int i = 0; i < s.length(); ++i)
{
bool isGraph = iswgraph(s[i]) != 0 || s[i] == '\r' || s[i] == '\n';
if (isGraph)
anchorComputer.process_bytes(&s[i], sizeof(TCHAR));
prevIsGraph = isGraph;
}
m_anchorHash = anchorComputer.checksum();
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:21,代码来源:TextCompare.cpp
示例17: GetModules
unsigned GetModules(const std::_tstring & module, IModuleVector & modules, bool GetChecksum = false, bool noRefresh=false) const
{
IModuleVector allModules;
GetAllModules(allModules, GetChecksum, noRefresh);
for(IModuleVector::iterator itr = allModules.begin(); itr != allModules.end(); ++itr)
{
IModule * parent = itr->get()->GetParentModule();
if ((!parent && module.empty()) || (parent && boost::algorithm::equals(module, parent->GetQualifiedLabel())))
modules.push_back(itr->get());
}
return 0;
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:12,代码来源:ModFileRepository.cpp
示例18: IsValidIdentifier
bool IsValidIdentifier(const std::_tstring & label)
{
if (label.size() == 0)
return false;
for (std::_tstring::size_type i = 0; i < label.size(); ++i)
{
switch (label.at(i))
{
case '<':
case '>':
case ':':
case '\"':
case '/':
case '\\':
case '|':
case '?':
case '*':
case '.':
return false;
}
}
return true;
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:23,代码来源:InsAttrDlg.cpp
示例19: Set
void Set(const std::_tstring & section, const std::_tstring & label, const _variant_t & val)
{
clib::recursive_mutex::scoped_lock proc(m_mutex);
SectionLabelDefault sl(SectionLabel(section, label), _T(""));
if(sl == GLOBAL_USER)
{
InitConfigPath(m_CfgName, _T("cfg"));
}
SectionLabel id(section, label);
if (m_cache.find(id) == m_cache.end() || CString(m_cache[id]).CompareNoCase(CString(val)) != 0)
{
if (!m_CfgPath.empty() && sl != GLOBAL_PASSWORD)
{
CString _val = val;
if ( !m_Cfg.PutString(section.c_str(), label.c_str(), _val) )
{
ATLTRACE(_T("PutString(%s,%s,Err=%x)\r\n"), section, label, ::GetLastError() );
}
}
m_cache[id] = val;
proc.unlock();
on_refresh(&id);
}
}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:24,代码来源:global.cpp
示例20: parse_rows
void CTable::parse_rows(const std::_tstring & table)
{
std::_tstring line;
for(std::size_t i = 0; i < table.size(); ++i)
{
line += table[i];
if (table[i] == _T('\n'))
{
m_rows.push_back(CLine(line));
line = _T("");
}
}
if (line.size())
m_rows.push_back(CLine(line));
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:15,代码来源:TextCompare.cpp
注:本文中的std::_tstring类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论