SliceO_Class Flags

 

This part of the class contain the different flags and their access functions.  The flags are used to signal that a class need to be updated, redrawn or just to give the state of the class.  We have an instance of these flags for each existing drawing windows.  For example, a specific class instance may need to be redraw in the current window but not in the others. The masks are 64 bits unsigned values . The meaning of each bits in the flags can be found in the "redraw.hpp" file for the redraw flag, the "update.hpp" file for the update flags, and here for the status flag.

 

The method to manipulate these flags received the same arguments: a "mode" (unsigned char) argument that can take the value:
CLASS_MODE_THIS                     Only this instance is affected

CLASS_MODE_PARENT                     All the parent classes in the database tree are affected

CLASS_MODE_CHILD                    All the children of this class in the database tree are affected

CLASS_MODE_SELECT                    Only selected instance are affected

CLASS_MODE_VISIBLE                    Only visible instance are affected

CLASS_MODE_CURRENT                    Only "current" instance are affected

 

A "window" (void *) argument.  This can be a pointer to the window for which the flag is affected or

CLASS_MODE_NONE                    None of the windows are affected

CLASS_MODE_ALL                    All of the windows are affected

CLASS_MODE_CURRENT                    Only the current windows is affected

 

A "mask" (UINT64) argument.  This is a mask of the bits that are affected.

 

Private:

m_flag_update_a (UINT64)

 

 

Public:

Update_A_Set_On

Set the bits identified by the mask to "1".

 

Update_A_Set_Off

Set the bits identified by by the mask to "0".

 

Update_A_Get_Bit

Return an "or" value of the bits identified by the mask for all affected classes.

 

Private:

m_flag_update_b (UINT64)

 

 

Public:

Update_B_Set_On

Set the bits identified by the mask to "1".

 

Update_B_Set_Off

Set the bits identified by the mask to "0".

 

Update_B_Get_Bit

Return an "or" value of the bits identified by the mask for all affected classes.

 

Private:

m_flag_redraw (UINT64)

 

 

Public:

Redraw_Set_On

Set the bits identified by the mask to "1".

 

Redraw_Set_Off

Set the bits identified by the mask to "0".

 

Redraw_Get_Bit

Return an "or" value of the bits identified by the mask for all affected classes.

 

Private:

m_flag_status (UINT64)

 

 

Public:

Flag_Set_On

Set the bits identified by the mask to "1".

 

Flag_Set_Off

Set the bits identified by the mask to "0".

 

Flag_Toggle

Toggle the value of the bits identified by the mask.

 

Flag_Get_Bit

Return an "or" value of the bits identified by the mask for all affected classes.

 

Public:

Visibility_Set

 

Set the visibility flag for an element an its descendants