本文整理汇总了C++中gd::Layout::SetCompilationNeeded方法的典型用法代码示例。如果您正苦于以下问题:C++ Layout::SetCompilationNeeded方法的具体用法?C++ Layout::SetCompilationNeeded怎么用?C++ Layout::SetCompilationNeeded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gd::Layout
的用法示例。
在下文中一共展示了Layout::SetCompilationNeeded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnEventsModified
void ChangesNotifier::OnEventsModified(
gd::Project& game,
gd::Layout& scene,
bool indirectChange,
gd::String sourceOfTheIndirectChange) const {
#if !defined(GD_NO_WX_GUI) // Compilation is not supported when wxWidgets
// support is disabled.
std::cout << "Changes occured inside " << scene.GetName() << "...";
scene.SetRefreshNeeded();
if (!indirectChange ||
!game.HasExternalEventsNamed(
sourceOfTheIndirectChange)) // Changes occured directly in the scene:
// Recompile it.
{
scene.SetCompilationNeeded();
CodeCompilationHelpers::CreateSceneEventsCompilationTask(game, scene);
std::cout << "Recompilation triggered." << std::endl;
} else {
DependenciesAnalyzer analyzer(
game, game.GetExternalEvents(sourceOfTheIndirectChange));
if (analyzer.ExternalEventsCanBeCompiledForAScene() == scene.GetName()) {
// Do nothing: Changes occured in an external event which is compiled
// separately
std::cout << "But nothing to do." << std::endl;
} else {
// Changes occurred in an external event which is directly included in the
// scene events.
scene.SetCompilationNeeded();
std::cout << "Recompilation asked for later." << std::endl;
}
}
#endif
}