本文整理汇总了C++中Package::Save方法的典型用法代码示例。如果您正苦于以下问题:C++ Package::Save方法的具体用法?C++ Package::Save怎么用?C++ Package::Save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::Save方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveWorld
void World::SaveWorld( const String& pFilename )
{
Package* package = PackageManager::Instance()->CreatePackage( pFilename );
SetOwner( package );
package->Save();
SetOwner( NULL );
GD_DELETE(package);
}
示例2: Create
void TemplateDlg::Create()
{
const PackageTemplate& tp = ActualTemplate();
ArrayMap<String, EscValue> var = MakeVars();
for(int i = 0; i < tp.file.GetCount(); i++) {
const FileTemplate& ft = tp.file[i];
if(IsNull(ft.condition) || IsTrue(Evaluate(ft.condition, var))) {
String fn = Expand(ft.filename, var);
if(!IsNull(fn)) {
fn = AppendFileName(AppendFileName(~nest, (String)~package), fn);
RealizePath(fn);
SaveFile(fn, Expand(ft.text, var));
}
}
}
Package p;
String f = AppendFileName(AppendFileName(~nest, (String)~package), (String)~package + ".upp");
p.Load(f);
p.description = ~description;
p.Save(f);
}
示例3: PackageOp
void WorkspaceWork::PackageOp(String active, String from_package, String rename)
{
active = UnixPath(active);
from_package = UnixPath(from_package);
rename = UnixPath(rename);
for(int i = 0; i < package.GetCount(); i++)
if(IsNull(from_package) || UnixPath(package[i].name) == from_package) {
String pp = PackagePath(package[i].name);
RealizePath(pp);
Package prj;
prj.Load(pp);
for(int i = prj.uses.GetCount(); --i >= 0;)
if(UnixPath(prj.uses[i].text) == active) {
if(rename.GetCount())
prj.uses[i].text = rename;
else
prj.uses.Remove(i);
}
prj.Save(pp);
}
ScanWorkspace();
SyncWorkspace();
}
示例4: ChangeDescription
void SelectPackageDlg::ChangeDescription()
{
int ii = GetCurrentIndex();
if(ii >= 0 && ii < packages.GetCount()) {
PkInfo& p = packages[ii];
WithDescriptionLayout<TopWindow> dlg;
CtrlLayoutOKCancel(dlg, "Package description");
String pp = PackagePath(p.package);
Package pkg;
if(!pkg.Load(pp)) {
Exclamation("Package does not exist.");
return;
}
dlg.text <<= pkg.description;
if(dlg.Run() != IDOK)
return;
pkg.description = ~dlg.text;
pkg.Save(pp);
p.description = description <<= ~dlg.text;
if(alist.IsCursor())
alist.Set(2, ~dlg.text);
}
}