本文整理汇总了C++中Package::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ Package::getName方法的具体用法?C++ Package::getName怎么用?C++ Package::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::getName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onFinish
void PackageService::onFinish()
{
FinishSqliteVFS();
// Turn off all sticky flags - NO MERCY!
for (PackageNameMap::iterator itr = _linkedPackages.begin(), end = _linkedPackages.end(); itr != end; ++itr)
{
itr->second->_stayResident = false;
itr->second->_stayForCurrent = false;
itr->second->_stayForNext = false;
}
// And compact so that all packages get disposed
compact();
// If Something's remaining, we're in danger!
for (PackageNameMap::iterator itr = _linkedPackages.begin(), end = _linkedPackages.end(); itr != end; ++itr)
{
Package* pack = itr->second;
LOG(0, "*** Package '%s': still alive: %d usage, requires:\n", pack->getName().c_str(), pack->getUseCount());
if (pack->getRequiredList().empty())
LOG(0, " <none>\n");
else
pack->printDependancy(1);
}
// Terminate AsyncLoader
if (_asyncLoader)
{
_asyncLoader->Terminate();
}
safeDelete(_asyncLoader);
}
示例2: doActivate
bool ApplicationPackage::doActivate()
{
trace_enter();
PackageList::iterator iter = m_pkgList.begin();
for (; iter != m_pkgList.end(); ++iter) {
Package *pkg = *iter;
if (pkg->activate() == false) {
log_error("error activating : name=" << pkg->getName());
return false;
}
}
return true;
}
示例3: doPassivate
bool ApplicationPackage::doPassivate()
{
trace_enter();
bool isPassivated = true;
PackageList::iterator iter = m_pkgList.begin();
for (; iter != m_pkgList.end(); ++iter) {
Package *pkg = *iter;
if (pkg->passivate() == false) {
log_error("error passivating : name=" << pkg->getName());
isPassivated = false;
}
}
return isPassivated;
}
示例4:
Package *ApplicationPackage::findChildPackage(const std::string &name)
{
PackageList::iterator pkgIter = m_pkgList.begin();
for(;pkgIter != m_pkgList.end(); ++pkgIter)
{
Package *ppkg = *pkgIter;
if (ppkg != NULL)
{
if (!ppkg->getName().compare(name))
{
return ppkg;
}
}
}
return NULL;
}
示例5: doConnectPort
bool ApplicationPackage::doConnectPort()
{
trace_enter();
// log_debug("[] Start Connecting Ports : name=" + getName());
// 패키지에 속해 있는 모든 컴포넌트의 포트를 연결 함
PackageList::iterator iter = m_pkgList.begin();
for (; iter != m_pkgList.end(); ++iter) {
Package *pkg = *iter;
if (pkg->connectPort() == false) {
log_error("error connectPort : name=" << pkg->getName());
return false;
}
}
return connectPortThis();
}
示例6: doUnload
bool ApplicationPackage::doUnload()
{
trace_enter();
// 패키지에 속해 있는 모든 컴포넌트를 언로드 함
PackageList::iterator iter = m_pkgList.begin();
for (; iter != m_pkgList.end(); ++iter) {
Package *pkg = *iter;
// 하나라도 실패하면 false 리턴
if (pkg->unload() == false) {
log_error("error unload component : name =" << pkg->getName());
//return false;
}
delete pkg;
}
m_pkgList.clear();
return true;
}
示例7: doDisconnectPort
bool ApplicationPackage::doDisconnectPort()
{
trace_enter();
bool isDisconnected;
if (disconnectPortThis()) isDisconnected = true;
else isDisconnected = false;
// 패키지에 속해 있는 모든 컴포넌트의 포트 연결을 해제함
PackageList::iterator iter = m_pkgList.begin();
for (; iter != m_pkgList.end(); ++iter) {
Package *pkg = *iter;
if (pkg->disconnectPort()== false) {
isDisconnected = false;
log_error("error disconnectPort : name=" << pkg->getName());
}
}
return isDisconnected;
}
示例8: onPackageRemove
void PackagesPage::onPackageRemove()
{
QModelIndex index = _ui->_listPackages->currentIndex();
Package package = PackageTable::getFromModel(_model, index.row());
QMessageBox msg(this);
msg.setWindowIcon(getIcon());
msg.setWindowTitle(tr("Remove package?"));
msg.setInformativeText(tr("Are you sure to delete package\n'%1'\nwith description\n'%2'?").arg(package.getName()).arg(package.getDescription()));
msg.setStandardButtons(QMessageBox::Yes|QMessageBox::No);
msg.setDefaultButton(QMessageBox::No);
msg.setIcon(QMessageBox::Warning);
int button = msg.exec();
if(button!=QMessageBox::Yes) return;
bool ok = _model->removeRow(index.row());
if(!ok) {
QMessageBox::critical(this, tr("Error"), tr("Could not remove package:\n %1").arg(_model->lastError().text()));
return;
}
_model->submitAll();
onCurrentRowChanged(QModelIndex());
}
示例9: loadComponentList
//.........这里部分代码省略.........
}
}
pkg->beforeComponentList.unique();
pkg->afterComponentList.unique();
// remove local circle
std::list<std::string>::iterator xxiter = pkg->beforeComponentList.begin();
for (;xxiter != pkg->beforeComponentList.end(); ++xxiter)
{
std::string &nstr = *xxiter;
pkg->afterComponentList.remove(nstr);
}
std::string lastAfter;
int lastIndex = -1;
// 누군가의 뒤에 위치해야 하는지 검사
xxiter = pkg->afterComponentList.begin();
for (;xxiter != pkg->afterComponentList.end(); ++ xxiter)
{
std::string &nstr = *xxiter;
PackageList::iterator pkgIter = m_pkgList.begin();
int index = 0;
for (;pkgIter != m_pkgList.end(); ++ pkgIter)
{
Package *ppkg = *pkgIter;
index++;
if (!nstr.compare(ppkg->getName()))
{
if (index > lastIndex)
{
lastAfter = nstr;
lastIndex = index;
}
break;
}
}
}
if (lastIndex == -1) // 앞에 있을 것이 없으므로 가장 앞에 넣는다
m_pkgList.push_front(pkg);
else
{
PackageList::iterator pkgIter = m_pkgList.begin();
for (;pkgIter != m_pkgList.end(); ++ pkgIter)
{
Package *ppkg = *pkgIter;
if (!lastAfter.compare(ppkg->getName()))
{
m_pkgList.insert(pkgIter,pkg);
break;
}
}
}
}
else {