本文整理汇总了C++中nglPath::GetNodeName方法的典型用法代码示例。如果您正苦于以下问题:C++ nglPath::GetNodeName方法的具体用法?C++ nglPath::GetNodeName怎么用?C++ nglPath::GetNodeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nglPath
的用法示例。
在下文中一共展示了nglPath::GetNodeName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: name
nuiSpriteDef::nuiSpriteDef(const nglPath& rSpriteDefPath)
{
Init();
nglString name(rSpriteDefPath.GetNodeName());
SetObjectName(name);
std::map<nglString, nuiSpriteDef*>::const_iterator it = mSpriteMap.find(name);
if (it != mSpriteMap.end())
it->second->Release();
mSpriteMap[name] = this;
{
std::list<nglPath> children;
rSpriteDefPath.GetChildren(&children);
std::list<nglPath>::const_iterator it = children.begin();
std::list<nglPath>::const_iterator end = children.end();
for (; it != end; it++)
{
nuiSpriteAnimation* pAnim = new nuiSpriteAnimation(*it);
if (pAnim->GetFrameCount())
AddAnimation(pAnim);
else
delete pAnim;
}
}
}
示例2: AddFile
void nuiMimeMultiPart::AddFile(const nglPath& rPath, const nglString& rVarName, const nglString& rFileName, ContentTransfertEncoding encoding)
{
nglString name(rFileName);
if (name.IsNull())
name = rPath.GetNodeName();
nglIStream* pFile = rPath.OpenRead();
if (!pFile)
return;
AddFile(pFile, rVarName, name, encoding);
}
示例3: mColor
nuiSprite::nuiSprite(const nglPath& rSpriteDefPath, bool forceReplace)
: mColor(255, 255, 255), mAlpha(1.0f), mBlendFunc(nuiBlendTransp)
{
mpSpriteDef = nuiSpriteDef::GetSprite(rSpriteDefPath.GetNodeName());
if (!mpSpriteDef || forceReplace)
{
mpSpriteDef = new nuiSpriteDef(rSpriteDefPath);
mpSpriteDef->Acquire();
}
NGL_ASSERT(mpSpriteDef);
Init();
}
示例4: CopyDirectory
bool ProjectGenerator::CopyDirectory(const nglPath& targetPath, const nglPath& srcpath)
{
// create folder
if (!targetPath.Create())
{
nglString msg;
msg.Format(_T("creating target folder '%ls'"), targetPath.GetChars());
return MsgError(msg);
}
std::list<nglPath> children;
srcpath.GetChildren(&children);
std::list<nglPath>::iterator it;
for (it = children.begin(); it != children.end(); ++it)
{
const nglPath& srcpath = *it;
if (!srcpath.IsLeaf())
continue;
nglPath dstpath = targetPath;
dstpath += srcpath.GetNodeName();
nglString contents;
nglIStream* piFile = srcpath.OpenRead();
if (!piFile)
{
nglString msg;
msg.Format(_T("opening for reading input file '%ls'"), srcpath.GetChars());
return MsgError(msg);
}
nglOStream* poFile = dstpath.OpenWrite(false);
if (!poFile)
{
nglString msg;
msg.Format(_T("opening for writing output file '%ls'"), dstpath.GetChars());
return MsgError(msg);
}
piFile->PipeTo(*poFile);
delete poFile;
delete piFile;
NGL_OUT(_T("nui project generator : created file '%ls'\n"), dstpath.GetChars());
}
return true;
}
示例5: Decompose
bool nglZipPath::Decompose(const nglPath& rPath, std::list<nglPath>& rList)
{
nglPath parent(rPath.GetParent());
nglString tmp = rPath.GetNodeName();
nglPath node(tmp.IsNull()? nglString::Empty : tmp);
if (parent == rPath)
return true;
rList.push_front(node);
return Decompose(parent, rList);
return true;
}
示例6: nglVolume
nglZipFS::nglZipFS(const nglPath& rPath)
: nglVolume(nglPath(rPath.GetNodeName()).GetRemovedExtension(), nglString::Empty, nglString::Empty, nglPathVolume::ReadOnly, nglPathVolume::eTypeZip),
mRoot(_T(""), 0, 0, 0, false), mpFileFuncDef(NULL)
{
mpStream = rPath.OpenRead();
mOwnStream = true;
SetValid(mpStream != NULL);
if (mpStream)
mpStream->SetEndian(eEndianIntel);
mpPrivate = new nglZipPrivate();
NGL_ASSERT(mpPrivate);
}
示例7: path
nuiSpriteAnimation::nuiSpriteAnimation(const nglPath& rPath)
: mFPS(10)
{
nglPath path(rPath);
std::list<nglPath> children;
path.GetChildren(&children);
children.sort(nglCompareNaturalPath);
std::list<nglPath>::const_iterator it = children.begin();
std::list<nglPath>::const_iterator end = children.end();
for (; it != end; it++)
{
nglPath p = *it;
nglString pp = p.GetRemovedExtension();
if (pp.GetRight(3) != _T("@2x"))
{
nuiSpriteFrame* pFrame = new nuiSpriteFrame();
pFrame->SetTexture(p);
AddFrame(pFrame);
}
}
SetName(rPath.GetNodeName());
}