BC_Synchronous Class Reference

#include <bcsynchronous.h>

Inherits Thread.

Inherited by Playback3D.

Collaboration diagram for BC_Synchronous:

Collaboration graph
[legend]

Public Member Functions

 BC_Synchronous ()
virtual ~BC_Synchronous ()
void quit ()
void create_objects ()
void start ()
void run ()
virtual BC_SynchronousCommandnew_command ()
virtual void handle_command (BC_SynchronousCommand *command)
void put_texture (int id, int w, int h, int components)
int get_texture (int w, int h, int components)
void release_texture (int window_id, int id)
unsigned int get_shader (char *source, int *got_it)
void put_shader (unsigned int handle, char *source)
void dump_shader (unsigned int handle)
void delete_window (BC_WindowBase *window)
int send_command (BC_SynchronousCommand *command)
void send_garbage (BC_SynchronousCommand *command)
BC_WindowBaseget_window ()

Private Member Functions

void handle_command_base (BC_SynchronousCommand *command)
void handle_garbage ()
void delete_window_sync (BC_SynchronousCommand *command)
void delete_pixmap_sync (BC_SynchronousCommand *command)

Private Attributes

Conditionnext_command
Mutexcommand_lock
Mutextable_lock
int done
ArrayList
< BC_SynchronousCommand * > 
commands
int is_running
BC_WindowBasecurrent_window
ArrayList< ShaderID * > shader_ids
ArrayList< TextureID * > texture_ids
ArrayList< PBufferID * > pbuffer_ids
ArrayList
< BC_SynchronousCommand * > 
garbage
int is_pbuffer

Friends

class BC_WindowBase
class VFrame
class BC_PBuffer
class BC_Pixmap
class BC_Texture

Detailed Description

Definition at line 132 of file bcsynchronous.h.


Constructor & Destructor Documentation

BC_Synchronous::BC_Synchronous (  ) 

Definition at line 90 of file bcsynchronous.C.

References command_lock, current_window, done, BC_WindowBase::get_resources(), is_running, next_command, BC_Resources::set_synchronous(), and table_lock.

Here is the call graph for this function:

BC_Synchronous::~BC_Synchronous (  )  [virtual]

Definition at line 102 of file bcsynchronous.C.

References commands, and ArrayList< TYPE >::remove_all_objects().

Here is the call graph for this function:


Member Function Documentation

void BC_Synchronous::quit (  ) 

void BC_Synchronous::create_objects (  ) 

Definition at line 112 of file bcsynchronous.C.

Referenced by MWindow::init_3d().

void BC_Synchronous::start (  ) 

Reimplemented from Thread.

Definition at line 116 of file bcsynchronous.C.

References run().

Referenced by MWindow::start().

Here is the call graph for this function:

void BC_Synchronous::run (  )  [virtual]

BC_SynchronousCommand * BC_Synchronous::new_command (  )  [virtual]

Reimplemented in Playback3D.

Definition at line 107 of file bcsynchronous.C.

Referenced by delete_window(), quit(), and send_command().

void BC_Synchronous::handle_command ( BC_SynchronousCommand command  )  [virtual]

Reimplemented in Playback3D.

Definition at line 201 of file bcsynchronous.C.

Referenced by handle_command_base().

void BC_Synchronous::put_texture ( int  id,
int  w,
int  h,
int  components 
)

int BC_Synchronous::get_texture ( int  w,
int  h,
int  components 
)

void BC_Synchronous::release_texture ( int  window_id,
int  id 
)

unsigned int BC_Synchronous::get_shader ( char *  source,
int *  got_it 
)

void BC_Synchronous::put_shader ( unsigned int  handle,
char *  source 
)

Definition at line 333 of file bcsynchronous.C.

References ArrayList< TYPE >::append(), current_window, BC_WindowBase::get_id(), Mutex::lock(), shader_ids, table_lock, and Mutex::unlock().

Referenced by VFrame::make_shader(), and BC_WindowBase::put_shader().

Here is the call graph for this function:

void BC_Synchronous::dump_shader ( unsigned int  handle  ) 

Definition at line 341 of file bcsynchronous.C.

References ShaderID::handle, Mutex::lock(), shader_ids, ShaderID::source, table_lock, ArrayList< TYPE >::total, Mutex::unlock(), and ArrayList< TYPE >::values.

Referenced by VFrame::dump_shader().

Here is the call graph for this function:

void BC_Synchronous::delete_window ( BC_WindowBase window  ) 

int BC_Synchronous::send_command ( BC_SynchronousCommand command  ) 

void BC_Synchronous::send_garbage ( BC_SynchronousCommand command  ) 

Definition at line 548 of file bcsynchronous.C.

References ArrayList< TYPE >::append(), garbage, Mutex::lock(), next_command, table_lock, Condition::unlock(), and Mutex::unlock().

Referenced by delete_window().

Here is the call graph for this function:

BC_WindowBase * BC_Synchronous::get_window (  ) 

Definition at line 557 of file bcsynchronous.C.

References current_window.

void BC_Synchronous::handle_command_base ( BC_SynchronousCommand command  )  [private]

Definition at line 175 of file bcsynchronous.C.

References BC_SynchronousCommand::command, BC_SynchronousCommand::command_done, done, handle_command(), handle_garbage(), BC_SynchronousCommand::QUIT, and Condition::unlock().

Referenced by run().

Here is the call graph for this function:

void BC_Synchronous::handle_garbage (  )  [private]

void BC_Synchronous::delete_window_sync ( BC_SynchronousCommand command  )  [private]

void BC_Synchronous::delete_pixmap_sync ( BC_SynchronousCommand command  )  [private]

Definition at line 533 of file bcsynchronous.C.

References BC_SynchronousCommand::display, and BC_SynchronousCommand::win.

Referenced by handle_garbage().


Friends And Related Function Documentation

friend class BC_WindowBase [friend]

Definition at line 138 of file bcsynchronous.h.

friend class VFrame [friend]

Definition at line 139 of file bcsynchronous.h.

friend class BC_PBuffer [friend]

Definition at line 140 of file bcsynchronous.h.

friend class BC_Pixmap [friend]

Definition at line 141 of file bcsynchronous.h.

friend class BC_Texture [friend]

Definition at line 142 of file bcsynchronous.h.


Field Documentation

Definition at line 234 of file bcsynchronous.h.

Referenced by BC_Synchronous(), quit(), run(), send_command(), and send_garbage().

Definition at line 235 of file bcsynchronous.h.

Referenced by BC_Synchronous(), quit(), run(), and send_command().

int BC_Synchronous::done [private]

Definition at line 242 of file bcsynchronous.h.

Referenced by BC_Synchronous(), handle_command_base(), and run().

Definition at line 244 of file bcsynchronous.h.

Referenced by quit(), run(), send_command(), and ~BC_Synchronous().

Definition at line 245 of file bcsynchronous.h.

Referenced by BC_Synchronous(), and run().

Definition at line 250 of file bcsynchronous.h.

Referenced by delete_window_sync(), dump_shader(), get_shader(), and put_shader().

Definition at line 251 of file bcsynchronous.h.

Referenced by delete_window_sync(), get_texture(), put_texture(), and release_texture().

Definition at line 252 of file bcsynchronous.h.

Referenced by delete_window_sync().

Definition at line 254 of file bcsynchronous.h.

Referenced by handle_garbage(), and send_garbage().

Definition at line 258 of file bcsynchronous.h.

Referenced by BC_WindowBase::enable_opengl(), and BC_PBuffer::enable_opengl().


The documentation for this class was generated from the following files:

Generated on Mon Apr 28 14:15:37 2008 for Cinelerra by  doxygen 1.5.5