本文整理汇总了C++中BrowserNode::memo方法的典型用法代码示例。如果您正苦于以下问题:C++ BrowserNode::memo方法的具体用法?C++ BrowserNode::memo怎么用?C++ BrowserNode::memo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrowserNode
的用法示例。
在下文中一共展示了BrowserNode::memo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: synchronize
// synchronize all in todir, current packages are 'nodes'
void BrowserNode::synchronize(QDir & todir, Q3Dict<BrowserNode> & nodes)
{
static Q3Dict<void> useful(9973); // all useful files
static bool made_useful = TRUE; // set at the first call
// compare nodes with young packages
Q3DictIterator<BrowserNode> ity(Youngs);
for (; ity.current(); ++ity) {
BrowserNode * from = ity.current();
BrowserNode * curr_bn = nodes.find(ity.currentKey());
if ((curr_bn == 0) || (curr_bn->state == Old)) {
// don't exist or must be updated
if (made_useful)
useful.insert(ity.currentKey(), (void *) 1);
QDir & fromdir = from->view->get_dir();
// copy package file
copy(fromdir, todir, from->filename);
// copy diagrams files
QStringList::Iterator its;
QStringList & diags = from->diagrams;
if (made_useful) {
for (its = diags.begin(); its != diags.end(); ++its) {
copy_if_needed(fromdir, todir, *its);
useful.insert(*its, (void *) 1);
}
}
else
for (its = diags.begin(); its != diags.end(); ++its)
copy_if_needed(fromdir, todir, *its);
// copy class body files
QStringList & cls = from->classes;
if (made_useful) {
for (its = cls.begin(); its != cls.end(); ++its) {
copy_if_needed(fromdir, todir, *its);
useful.insert(*its, (void *) 1);
}
}
else
for (its = cls.begin(); its != cls.end(); ++its)
copy_if_needed(fromdir, todir, *its);
if (from->parent() == 0) {
// project, special files
copy_if_needed(fromdir, todir, "cpp_includes");
copy_if_needed(fromdir, todir, "idl_includes");
copy_if_needed(fromdir, todir, "java_imports");
copy_if_needed(fromdir, todir, "generation_settings");
copy_if_needed(fromdir, todir, "import");
copy_if_needed(fromdir, todir, "include");
copy_if_needed(fromdir, todir, "stereotypes");
copy_if_needed(fromdir, todir, "tools");
}
}
else if (made_useful)
// young, memorize packages, diagrams and classes body file
from->memo(useful);
}
if (made_useful) {
// memorize up to date packages, diagrams and classes body file
Q3DictIterator<BrowserNode> itn(nodes);
for (; itn.current(); ++itn)
if (itn.current()->state == UpToDate)
itn.current()->memo(useful);
made_useful = FALSE;
}
// remove files associated to deleted elements
purge(todir, useful);
}