Class CJobText
See Also: Class MaxNetCallBack, Structure JobText, List of Job Text Types
class CJobText
Description:
This class is available in release 4.0 and later only.
The CJobText class stores job information which is of a dynamic nature or of variable length.
Methods:
public:
Prototype:
~CJobText();
Remarks:
Destructor. The CJobText buffers will be deallocated.
Prototype:
int Count();
Remarks:
This method return the number of JobText buffers in the list.
Note: Developers should use Job.jobtextcount to find out how many elements there are.
Prototype:
int Add(JobText* jt);
Remarks:
This method will add another JobText buffer.
Parameters:
JobText* jt
A pointer to the JobText buffer to add.
Return Value:
The number of JobText buffers.
Prototype:
void Delete(int idx, int count = 1);
Remarks:
This method will delete one or a sequence of buffers.
Parameters:
int idx
The position of the first index to be deleted.
int count
The number of entries to delete.
Prototype:
void Reset();
Remarks:
This method will reset and deallocate the CJobText buffers.
Prototype:
JobText* Buffer();
Remarks:
This method will return a pointer to the actual JobText buffer.
Prototype:
int BufferSize();
Remarks:
This method returns the total size of the JobText buffer.
Prototype:
int FindJobText(JOB_TEXT_TYPE tp, int start = 0);
Remarks:
This method allows you to search for a JobText entry by its type. Refer to the list of Job Text types for details.
Parameters:
JOB_TEXT_TYPE tp
The Job Text type you wish to find.
int start
The start position from which to initiate the search process.
Return Value:
The index of the entry which was found, or -1 if not found.
Prototype:
bool GetTextItem(TCHAR* text, JOB_TEXT_TYPE type, int start = 0, int* idx = 0);
Remarks:
This method retrieves an index based on it’s Text Type. Refer to the List of Job Text Types for details.
Parameters:
TCHAR* text
A pointer to the text buffer which will be filled in by the method.
JOB_TEXT_TYPE type
The Job Text type you wish to find.
int start
The start position from which to retrieve the text item.
int* idx
A pointer to the index found.
Return Value:
TRUE if the method was successful, otherwise FALSE.
Prototype:
bool GetUser(TCHAR* user);
Remarks:
This method will retrieve the user name associated with a job.
Parameters:
TCHAR* user
The user name which was retrieved.
Return Value:
TRUE if the user name was retrieved, otherwise FALSE.
Prototype:
bool GetComputer(TCHAR* computer);
Remarks:
This method will retrieve the computer name associated with a job.
Parameters:
TCHAR* computer
The computer name which was retrieved.
Return Value:
TRUE if the computer name was retrieved, otherwise FALSE.
Prototype:
bool GetFrames(TCHAR* frames);
Remarks:
This method will retrieve the frame sequence (such as the "1,2,4,5-40" types).
Parameters:
TCHAR *frames
The frames retrieved.
Return Value:
TRUE if the frame sequence string was retrieved, otherwise FALSE.
Prototype:
bool GetShare(TCHAR* share);
Remarks:
This method will retrieve the Manager’s network share associated with a job.
Parameters:
TCHAR* share
The network share which was retrieved.
Return Value:
TRUE if the network share was retrieved, otherwise FALSE.
Operators:
Prototype:
JobText& operator[](const int i);
Remarks:
This access operator returns a reference to a JobText entry.
Parameters:
const int i
The index of the JobText buffer to return.