CJobText Class Reference

#include <maxnet_job.h>

Class Description

See also
MaxNetCallBack, JobText, JOB_TEXT_TYPE

Description:
The CJobText class stores job information which is of a dynamic nature or of variable length.
+ Inheritance diagram for CJobText:

Public Member Functions

 CJobText ()
 
 ~CJobText ()
 
int Count ()
 
int Add (JobText *jt)
 
void Delete (int idx, int count=1)
 
void Reset ()
 
JobTextBuffer ()
 
int BufferSize ()
 
JobTextoperator[] (const int i)
 
int FindJobText (JOB_TEXT_TYPE tp, int start=0)
 
bool GetTextItem (MCHAR *text, JOB_TEXT_TYPE type, int start=0, int *idx=0)
 
bool GetUser (MCHAR *user)
 
bool GetComputer (MCHAR *computer)
 
bool GetFrames (MCHAR *frames)
 
bool GetShare (MCHAR *share)
 

Protected Attributes

voidlist
 

Friends

class MaxNetManagerImp
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

CJobText ( )
~CJobText ( )
Remarks
Destructor. The CJobText buffers will be deallocated.

Member Function Documentation

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.
int Add ( JobText jt)
Remarks
This method will add another JobText buffer.
Parameters:
JobText* jt

A pointer to the JobText buffer to add.
Returns
The number of JobText buffers.
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.
void Reset ( )
Remarks
This method will reset and deallocate the CJobText buffers.
JobText* Buffer ( )
Remarks
This method will return a pointer to the actual JobText buffer.
int BufferSize ( )
Remarks
This method returns the total size of the JobText buffer.
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.
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.
Returns
The index of the entry which was found, or -1 if not found.
bool GetTextItem ( MCHAR 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 JOB_TEXT_TYPE for details.
Parameters:
MCHAR* 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.
Returns
TRUE if the method was successful, otherwise FALSE.
bool GetUser ( MCHAR user)
Remarks
This method will retrieve the user name associated with a job.
Parameters:
MCHAR* user

The user name which was retrieved.
Returns
TRUE if the user name was retrieved, otherwise FALSE.
bool GetComputer ( MCHAR computer)
Remarks
This method will retrieve the computer name associated with a job.
Parameters:
MCHAR* computer

The computer name which was retrieved.
Returns
TRUE if the computer name was retrieved, otherwise FALSE.
bool GetFrames ( MCHAR frames)
Remarks
This method will retrieve the frame sequence (such as the "1,2,4,5-40" types).
Parameters:
MCHAR *frames

The frames retrieved.
Returns
TRUE if the frame sequence string was retrieved, otherwise FALSE.
bool GetShare ( MCHAR share)
Remarks
This method will retrieve the Manager's network share associated with a job.
Parameters:
MCHAR* share

The network share which was retrieved.
Returns
TRUE if the network share was retrieved, otherwise FALSE.
Operators:

Friends And Related Function Documentation

friend class MaxNetManagerImp
friend

Member Data Documentation

void* list
protected