doxygen index page, OnResume all modules from Context::Resume

develop
Petr Mrázek 2010-07-07 01:35:38 +02:00
parent ec35663b62
commit 46d776cf46
5 changed files with 24 additions and 11 deletions

@ -38,6 +38,7 @@ IF(DOXYGEN_FOUND)
# the Doxyfile with a REGEX REPLACE (see below) # the Doxyfile with a REGEX REPLACE (see below)
SET( DOXYGEN_SOURCE_DIR SET( DOXYGEN_SOURCE_DIR
# "${CMAKE_SOURCE_DIR}/library" # "${CMAKE_SOURCE_DIR}/library"
"${CMAKE_SOURCE_DIR}/doc/index.dxgen"
"${CMAKE_SOURCE_DIR}/library/include" "${CMAKE_SOURCE_DIR}/library/include"
"${CMAKE_SOURCE_DIR}/library/include/dfhack" "${CMAKE_SOURCE_DIR}/library/include/dfhack"
"${CMAKE_SOURCE_DIR}/library/include/dfhack/modules" "${CMAKE_SOURCE_DIR}/library/include/dfhack/modules"

@ -8,7 +8,7 @@ PROJECT_NUMBER = @DFHACK_VERSION@
OUTPUT_DIRECTORY = . OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = ABBREVIATE_BRIEF =
@ -31,7 +31,7 @@ SUBGROUPING = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Build related configuration options # Build related configuration options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
EXTRACT_ALL = YES EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = NO EXTRACT_LOCAL_CLASSES = NO
@ -69,7 +69,7 @@ WARN_LOGFILE =
# configuration options related to the input files # configuration options related to the input files
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
INPUT = @CMAKE_DOXYGEN_INPUT_LIST@ INPUT = @CMAKE_DOXYGEN_INPUT_LIST@
FILE_PATTERNS = *.cpp *.h FILE_PATTERNS = *.cpp *.h *.dxgen
RECURSIVE = NO RECURSIVE = NO
EXCLUDE = EXCLUDE =
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
@ -102,10 +102,6 @@ IGNORE_PREFIX =
GENERATE_HTML = YES GENERATE_HTML = YES
HTML_OUTPUT = html HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html HTML_FILE_EXTENSION = .html
# this code is needed if you want to build this doxygen docu for a static wep page as http://libnoise.sourceforge.net/
#HTML_HEADER = htmldata/templateheader.html
#HTML_FOOTER = htmldata/templatefooter.html
#HTML_STYLESHEET = htmldata/doxygen.css
HTML_ALIGN_MEMBERS = YES HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO GENERATE_HTMLHELP = NO

@ -173,6 +173,10 @@ bool Context::AsyncSuspend()
bool Context::Resume() bool Context::Resume()
{ {
for(int i = 0 ; i < d->allModules.size(); i++)
{
d->allModules[i]->OnResume();
}
return d->p->resume(); return d->p->resume();
} }
bool Context::ForceResume() bool Context::ForceResume()

@ -36,9 +36,18 @@ namespace DFHack
~Module(){}; ~Module(){};
virtual bool Start(){return true;};// default start... virtual bool Start(){return true;};// default start...
virtual bool Finish() = 0;// everything should have a Finish() virtual bool Finish() = 0;// everything should have a Finish()
virtual bool doFinishOnResume(){return true;}; // should Context call Finish when Resume is called? // should Context call Finish when Resume is called?
virtual bool doFinishOnMapChange(){return false;}; // Finish when map change is detected? virtual bool OnResume()
virtual bool doFinishOnDetach(){return false;}; // Finish in Context::Detach? {
Finish();
return true;
};
// Finish when map change is detected?
// TODO: implement
virtual bool OnMapChange()
{
return false;
};
}; };
} }
#endif //MODULE_H_INCLUDED #endif //MODULE_H_INCLUDED

@ -66,7 +66,10 @@ Position::Position(DFContextShared * d_)
d->cursor_xyz_offset = mem->getAddress ("cursor_xyz"); d->cursor_xyz_offset = mem->getAddress ("cursor_xyz");
d->window_dims_offset = mem->getAddress ("window_dims"); d->window_dims_offset = mem->getAddress ("window_dims");
d->Started = true; d->Started = true;
}
catch(exception &){};
try
{
d->hotkey_start = mem->getAddress("hotkey_start"); d->hotkey_start = mem->getAddress("hotkey_start");
d->hotkey_mode_offset = mem->getOffset ("hotkey_mode"); d->hotkey_mode_offset = mem->getOffset ("hotkey_mode");
d->hotkey_xyz_offset = mem->getOffset("hotkey_xyz"); d->hotkey_xyz_offset = mem->getOffset("hotkey_xyz");