Pyrogenesis  trunk
Macros | Typedefs | Functions
Loader.h File Reference
#include <wchar.h>
Include dependency graph for Loader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LDR_CHECK_TIMEOUT(completed_jobs, total_jobs)
 

Typedefs

typedef int(* LoadFunc) (void *param, double time_left)
 

Functions

void LDR_BeginRegistering ()
 
void LDR_Register (LoadFunc func, void *param, const wchar_t *description, int estimated_duration_ms)
 
void LDR_EndRegistering ()
 
void LDR_Cancel ()
 
Status LDR_ProgressiveLoad (double time_budget, wchar_t *next_description, size_t max_chars, int *progress_percent)
 
Status LDR_NonprogressiveLoad ()
 

Macro Definition Documentation

#define LDR_CHECK_TIMEOUT (   completed_jobs,
  total_jobs 
)
Value:
if(timer_Time() > end_time)\
{\
size_t progress_percent = ((completed_jobs)*100 / (total_jobs));\
/* 0 means "finished", so don't return that! */\
if(progress_percent == 0)\
progress_percent = 1;\
ENSURE(0 < progress_percent && progress_percent <= 100);\
return (int)progress_percent;\
}
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
Definition: debug.h:287
double timer_Time()
Definition: timer.cpp:98

Typedef Documentation

typedef int(* LoadFunc) (void *param, double time_left)

Function Documentation

void LDR_BeginRegistering ( )
void LDR_Cancel ( )
void LDR_EndRegistering ( )
Status LDR_NonprogressiveLoad ( )
Status LDR_ProgressiveLoad ( double  time_budget,
wchar_t next_description,
size_t  max_chars,
int *  progress_percent 
)
void LDR_Register ( LoadFunc  func,
void *  param,
const wchar_t description,
int  estimated_duration_ms 
)