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) (std::shared_ptr< void > param, double time_left)
 

Functions

void LDR_BeginRegistering ()
 
void LDR_Register (LoadFunc func, std::shared_ptr< 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

◆ LDR_CHECK_TIMEOUT

#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;\
}
double timer_Time()
Definition: timer.cpp:130

Typedef Documentation

◆ LoadFunc

typedef int(* LoadFunc) (std::shared_ptr< void > param, double time_left)

Function Documentation

◆ LDR_BeginRegistering()

void LDR_BeginRegistering ( )

◆ LDR_Cancel()

void LDR_Cancel ( )

◆ LDR_EndRegistering()

void LDR_EndRegistering ( )

◆ LDR_NonprogressiveLoad()

Status LDR_NonprogressiveLoad ( )

◆ LDR_ProgressiveLoad()

Status LDR_ProgressiveLoad ( double  time_budget,
wchar_t *  next_description,
size_t  max_chars,
int *  progress_percent 
)

◆ LDR_Register()

void LDR_Register ( LoadFunc  func,
std::shared_ptr< void >  param,
const wchar_t *  description,
int  estimated_duration_ms 
)