This class is used to create memory buffers that are then used in the "User" buffers in the sliceO_Class class.
Each buffer is assigned a priority between 0 and 15. The higher the priority number the lower the actual priority of the buffer. If sliceOmatic run low on RAM memory, it will delete low priority buffers until the problem is resolved.
SliceO_Buffer Class
The SliceO_Buffer class contain:
Constructors
The constructor and destructor for the class
Identification
Some methods to define the class instance, they are derived from the parent (SliceO) class:
|
Private:
|
m_class_a (unsigned short)
|
The exact meaning of the content of "A" depend on the class:
|
SliceO_Buffer
|
The buffer's "Lock"/"Unlock" flag
|
|
|
Public:
|
Class_A_Get
|
Return the value of the "m_class_a" variable.
|
|
Class_A_Set
|
Set the value of the "m_class_a" variable.
|
|
Private:
|
m_class_b (unsigned short)
|
The exact meaning of content of "B" depend on the class:
|
SliceO_Buffer
|
Buffer's priority
|
|
|
Public:
|
Class_B_Get
|
Return the value of the "m_class_b" variable.
|
|
Class_B_Set
|
Set the value of the "m_class_b" variable.
|
|
Private:
|
m_name (char *)
|
Name of the class instance
|
|
Public:
|
Name_Get
|
Return the name of the class instance
|
|
Name_Set
|
Assign a name to the class instance
|
Size
A variable to contain the size of the memory buffer and a method to access it.
|
Private:
|
m_size (unsigned int)
|
A variable containing the size (in bytes) of the data associated with the buffer
|
|
Public:
|
Size_Get
|
A method that returns the size of the associated data.
|
Data Array
Some variables containing the actual file data. The data can be either a 1 dimension array, or a 2 dimensions matrix.
|
Private:
|
m_data (unsigned char *)
|
A pointer to the data buffer
|
|
Public:
|
Data_New
|
A method that create the memory for the data buffer
|
|
Data_Clear
|
A method that clear the memory of the data buffer to "0"
|
|
Data_Get
|
A method that return a pointer to the data buffer
|
|
Data_Delete
|
A method that free the memory used by the data buffer.
|
Data Matrix
|
Private:
|
m_matrix (void **)
|
Pointer to the matrix
|
|
m_mat_x (unsigned short)
|
"x" dimension of the matrix
|
|
m_mat_y (unsigned short)
|
"y" dimension of the matrix
|
|
m_mat_dim (unsigned short)
|
size (in bytes) of each cell of the matrix
|
|
Public:
|
Matrix_New
|
A method that return a pointer to the name of this instance or a pointer to "no name" if it is empty. By default, the name is the name of the file without path or extensions.
|
|
Matrix_Clear
|
A method that clear the content of the matrix to "0"
|
|
Matrix_Get_X
|
A method that return the "x" dimension of the matrix.
|
|
Matrix_Get_Y
|
A method that return the "x" dimension of the matrix.
|
|
Matrix_Get_Dim
|
A method that return the size (in bytes) of each cell of the matrix.
|
|
Matrix_Get
|
A method that return a pointer to the matrix.
|
|
Matrix_Copy
|
A method that create the matrix by making a duplicate of an existing matrix of the same dimensions.
|
|
Matrix_Delete
|
A method that free the memory used by the matrix.
|
Data tree
And finally, the buffer can be the root of a tree of buffers.
|
Public:
|
m_child_nb (unsigned short)
|
Number of children buffers
|
|
m_child_pt (SliceO_Buffer *)
|
Array of pointers to the children buffers
|