Class Feuille

This class provide the support of managing the class hierarchy (which container contains this feuille), locking the object and propagating post_redisplay from a feuille to its containers.

Public type

None

Constructor and destructor

Feuille(ObjectType new_type = TypeFeuille,
	const char * new_name = "");

type describe the type of the object being created,
name provide an optional name

virtual ~Feuille();

Public methods

static void init(Dispatcher *new_dispatcher,
		 WorkFarm *new_work_farm,
		 TimerQueue *new_timer_queue)

init should be called before any object of type Feuille is created. new_dispatcher, new_work_farm, and new_timer_queue will be used system wise as the dispatcher, work_farm and timer_queue respectively.

virtual void post_redisplay();

post_redisplay can be redefined by the subclass to change the redisplay behavior (see Visual). The default behavior is to propagate the redisplay request to all the container which contain the Feuille.

virtual void removed_from_container(ContainerPtr target);

removed_from_container is called when the feuille is removed from its container. The default behavior is simply to remove target from the container list. By redefining this function subclass objects can change their behavior when they are removed from a container. Note that the redefined function should call this function.

virtual void added_to_container(ContainerPtr target);

added_to_container is called when the feuille is added to a container. The default behavior is simply to add target to the container list. By redefining this function subclass objects can change their behavior when they are added to a container. Note that the redefined function should call this function.

Public fields

static Dispatcher *dispatcher;
static WorkFarm *work_farm;
static TimerQueue *timer_queue;
dispatcher, work_farm, timer_queue are provided as a convenience to access the system wide dispatcher, work_farm and timer_queue respectively.

Protected fields

list<ContainerPtr> containers;
containers is the list of all the containers containing this feuille. This list can only be accessed after aquiring the lock containers_lock
UtilSemaphore lock;
lock is provided as a unified way to lock the object.
UtilSemaphore containers_lock;
containers_lock should be aquired before accessing the list containers.