MIJOB Class Reference

#include <mi32/mijob.h>

List of all members.

Public Member Functions

 MIJOB ()
virtual ~MIJOB ()
XMLNODEAddBinary (const char *name, const SIMPLE_ARRAY< UINT8 > &data, XMLNODE *node=0)
XMLNODEAddInputObject (const char *id, const RVC::OBJITEM &objitem, XMLNODE *node=0, bool IgnoreForBlocking=false, bool BlockIfExist=false, bool BlockIfNotExist=false)
XMLNODEAddInputPath (const char *id, const FILEPATH &path, XMLNODE *node=0, bool IgnoreForBlocking=false, bool BlockIfExist=false, bool BlockIfNotExist=false)
XMLNODEAddInputPath (const char *id, const char *path, XMLNODE *node=0, bool IgnoreForBlocking=false, bool BlockIfExist=false, bool BlockIfNotExist=false)
XMLNODEAddInputPath (const char *id, const MISTRING &path, XMLNODE *node=0, bool IgnoreForBlocking=false, bool BlockIfExist=false, bool BlockIfNotExist=false)
XMLNODEAddNode (const char *name, XMLNODE *node=0)
XMLNODEAddOutputObject (const char *id, const RVC::OBJITEM &objitem, XMLNODE *node=0, bool IgnoreForBlocking=false)
XMLNODEAddOutputPath (const char *id, const FILEPATH &path, XMLNODE *node=0, bool IgnoreForBlocking=false)
XMLNODEAddOutputPath (const char *id, const char *path, XMLNODE *node=0, bool IgnoreForBlocking=false)
XMLNODEAddOutputPath (const char *id, const MISTRING &path, XMLNODE *node=0, bool IgnoreForBlocking=false)
XMLNODEAddValue (const char *name, bool value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, double value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, INT8 value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, UINT8 value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, INT16 value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, UINT16 value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, INT32 value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, UINT32 value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, const char *value, XMLNODE *node=0)
XMLNODEAddValue (const char *name, const MISTRING &value, XMLNODE *node=0)
ERRVALUE CreateJob (const MISTRING &description, const MISTRING &process, INT32 priority=-1)
XMLNODEFindBinary (const char *name, SIMPLE_ARRAY< UINT8 > &data, const XMLNODE *node=0) const
template<typename _ENUMTYPE >
XMLNODEFindEnum (const char *name, _ENUMTYPE &value, const XMLNODE *node=0) const
XMLNODEFindNode (const char *name, const XMLNODE *node=0) const
XMLNODEFindObject (const char *id, RVC::OBJITEM &objitem, const XMLNODE *node=0) const
XMLNODEFindPath (const char *id, FILEPATH &path, const XMLNODE *node=0) const
XMLNODEFindPath (const char *id, MISTRING &pathstr, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, bool &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, float &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, double &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, INT8 &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, UINT8 &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, INT16 &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, UINT16 &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, int &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, unsigned int &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, long &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, unsigned long &value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, char *&value, const XMLNODE *node=0) const
XMLNODEFindValue (const char *name, MISTRING &value, const XMLNODE *node=0) const
void GetBlockingIfExistList (FILEPATHLIST &list) const
void GetBlockingIfNotExistList (FILEPATHLIST &list) const
void GetBlockingInputList (FILEPATHLIST &list) const
void GetBlockingOutputList (FILEPATHLIST &list) const
void GetDescription (MISTRING &desc) const
template<typename _ENUMTYPE >
bool GetEnum (const char *name, _ENUMTYPE &value, const XMLNODE *node=0) const
template<typename _ENUMTYPE >
_ENUMTYPE GetEnumDefaulted (const char *name, _ENUMTYPE dft, const XMLNODE *node=0) const
void GetGroupID (MISTRING &GroupID)
void GetInputList (FILEPATHLIST &list) const
void GetOutputList (FILEPATHLIST &list) const
const FILEPATHGetPath () const
INT32 GetPriority () const
void GetProcess (MISTRING &process) const
XMLNODEGetRootNode ()
XMLNODEGetRunParmsNode ()
template<typename _NUMTYPE >
_NUMTYPE GetValueDefaulted (const char *name, _NUMTYPE value) const
bool IsTimeToRun ()
bool IsVersionMatch ()
ERRVALUE ReadJob (const FILEPATH &path)
ERRVALUE ReadJobNoStatus (const FILEPATH &path)
bool SetGroupID (const MISTRING &GroupID)
ERRVALUE SetNextTime ()
void SetReady ()
ERRVALUE Write (const FILEPATH &directory, bool held=false, FILEPATH *path=0, bool bCreateAsTemp=false)
ERRVALUE Write (bool held=false, FILEPATH *path=0, bool bCreateAsTemp=false)
ERRVALUE WriteDoc ()
ERRVALUE WriteScheduled (FILEPATH *path=0)

Static Public Member Functions

static ERRVALUE CreateGroup (const FILEPATH &directory, const MISTRING &description, MISTRING &GroupID, INT32 priority=-1, bool bCreateAsTemp=false)
static ERRVALUE CreateGroup (const MISTRING &description, MISTRING &GroupID, INT32 priority=-1, bool bCreateAsTemp=false)
static ERRVALUE ResolveTempJobs ()

Constructor & Destructor Documentation

MIJOB::MIJOB (  ) 
virtual MIJOB::~MIJOB (  )  [virtual]

Member Function Documentation

XMLNODE* MIJOB::AddBinary ( const char *  name,
const SIMPLE_ARRAY< UINT8 > &  data,
XMLNODE node = 0 
)

Add binary data value.

Parameters:
name Name of variable
node Parent node
XMLNODE* MIJOB::AddInputObject ( const char *  id,
const RVC::OBJITEM objitem,
XMLNODE node = 0,
bool  IgnoreForBlocking = false,
bool  BlockIfExist = false,
bool  BlockIfNotExist = false 
)

Create input object.

Parameters:
id ID string assigned to object, should choose something specific to process
objitem Objitem of object
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
BlockIfExist If set to true, will block job if file exists
BlockIfNotExist If set to true, will block job if file does not exist
XMLNODE* MIJOB::AddInputPath ( const char *  id,
const FILEPATH path,
XMLNODE node = 0,
bool  IgnoreForBlocking = false,
bool  BlockIfExist = false,
bool  BlockIfNotExist = false 
)

Create input path using FILEPATH.

Parameters:
id ID string assigned to object, should choose something specific to process
path Path
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
BlockIfExist If set to true, will block job if file exists
BlockIfNotExist If set to true, will block job if file does not exist
XMLNODE* MIJOB::AddInputPath ( const char *  id,
const char *  path,
XMLNODE node = 0,
bool  IgnoreForBlocking = false,
bool  BlockIfExist = false,
bool  BlockIfNotExist = false 
)

Create input path using char*.

Parameters:
id ID string assigned to object, should choose something specific to process
path String of path
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
BlockIfExist If set to true, will block job if file exists
BlockIfNotExist If set to true, will block job if file does not exist
XMLNODE* MIJOB::AddInputPath ( const char *  id,
const MISTRING path,
XMLNODE node = 0,
bool  IgnoreForBlocking = false,
bool  BlockIfExist = false,
bool  BlockIfNotExist = false 
)

Create input path using MISTRING.

Parameters:
id ID string assigned to object, should choose something specific to process
path String of path
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
BlockIfExist If set to true, will block job if file exists
BlockIfNotExist If set to true, will block job if file does not exist
XMLNODE* MIJOB::AddNode ( const char *  name,
XMLNODE node = 0 
)

Add general node.

Returns:
Node to contain
Parameters:
name Name of node
node Parent node
XMLNODE* MIJOB::AddOutputObject ( const char *  id,
const RVC::OBJITEM objitem,
XMLNODE node = 0,
bool  IgnoreForBlocking = false 
)

Create output object.

Parameters:
id ID string assigned to object, should choose something specific to process
objitem Objitem of object
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
XMLNODE* MIJOB::AddOutputPath ( const char *  id,
const FILEPATH path,
XMLNODE node = 0,
bool  IgnoreForBlocking = false 
)

Create output path using FILEPATH.

Parameters:
id ID string assigned to object, should choose something specific to process
path Path
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
XMLNODE* MIJOB::AddOutputPath ( const char *  id,
const char *  path,
XMLNODE node = 0,
bool  IgnoreForBlocking = false 
)

Create output path using MISTRING.

Parameters:
id ID string assigned to object, should choose something specific to process
path String of path
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
XMLNODE* MIJOB::AddOutputPath ( const char *  id,
const MISTRING path,
XMLNODE node = 0,
bool  IgnoreForBlocking = false 
)

Create output path using MISTRING.

Parameters:
id ID string assigned to object, should choose something specific to process
path String of path
node Parent node
IgnoreForBlocking If set to true, will only be used for tooltips and not checked for blocking issues
XMLNODE* MIJOB::AddValue ( const char *  name,
bool  value,
XMLNODE node = 0 
)

Add bool variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
double  value,
XMLNODE node = 0 
)

Add double variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
INT8  value,
XMLNODE node = 0 
)

Add INT8 variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
UINT8  value,
XMLNODE node = 0 
)

Add UINT8 variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
INT16  value,
XMLNODE node = 0 
)

Add INT16 variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
UINT16  value,
XMLNODE node = 0 
)

Add UINT16 variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
INT32  value,
XMLNODE node = 0 
)

Add INT32 variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
UINT32  value,
XMLNODE node = 0 
)

Add UINT32 variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
const char *  value,
XMLNODE node = 0 
)

Add char*.

Parameters:
name Name of variable
value Value to assign
node Parent node
XMLNODE* MIJOB::AddValue ( const char *  name,
const MISTRING value,
XMLNODE node = 0 
)

Add string variable.

Parameters:
name Name of variable
value Value to assign
node Parent node
static ERRVALUE MIJOB::CreateGroup ( const FILEPATH directory,
const MISTRING description,
MISTRING GroupID,
INT32  priority = -1,
bool  bCreateAsTemp = false 
) [static]

Write group file to default job directory.

Parameters:
directory Directory to create job file in
description Job description string
GroupID GroupID created
priority Group priority
bCreateAsTemp Create as temp group
static ERRVALUE MIJOB::CreateGroup ( const MISTRING description,
MISTRING GroupID,
INT32  priority = -1,
bool  bCreateAsTemp = false 
) [static]

Write group file to default job directory.

Parameters:
description Job description string
GroupID GroupID created
priority Group priority
bCreateAsTemp Create as temp group
ERRVALUE MIJOB::CreateJob ( const MISTRING description,
const MISTRING process,
INT32  priority = -1 
)

Create new job file Filename will be YYYMMDD_HHMMSS_##.tntjob where ## gets incremented when there is already a job with same timestamp.

Parameters:
description Job description string
process String with executable and process to run, i.e. rastanly compsasjob
priority Job priority; 1-9
XMLNODE* MIJOB::FindBinary ( const char *  name,
SIMPLE_ARRAY< UINT8 > &  data,
const XMLNODE node = 0 
) const

Get binary data variable.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
data Data returned
node Parent node or previous list node
template<typename _ENUMTYPE >
XMLNODE* MIJOB::FindEnum ( const char *  name,
_ENUMTYPE &  value,
const XMLNODE node = 0 
) const [inline]

Find enum value.

Value is left unchanged if not found.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Variable name
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindNode ( const char *  name,
const XMLNODE node = 0 
) const

Find general node.

Returns:
Node found
Parameters:
name Name of node
node Parent node or previous list node
XMLNODE* MIJOB::FindObject ( const char *  id,
RVC::OBJITEM objitem,
const XMLNODE node = 0 
) const

Get input or output object.

Parameters:
id ID of object
objitem objitem returned
node Parent node or previous list node
XMLNODE* MIJOB::FindPath ( const char *  id,
FILEPATH path,
const XMLNODE node = 0 
) const

Get input or output path as FILEPATH.

Parameters:
id ID of object
path Path returned
node Parent node or previous list node
XMLNODE* MIJOB::FindPath ( const char *  id,
MISTRING pathstr,
const XMLNODE node = 0 
) const

Get input or output path as MISTRING.

Parameters:
id ID of object
pathstr String path returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
bool &  value,
const XMLNODE node = 0 
) const

Get bool variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
float &  value,
const XMLNODE node = 0 
) const

Get float variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
double &  value,
const XMLNODE node = 0 
) const

Get double variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
INT8 value,
const XMLNODE node = 0 
) const

Get INT8 variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
UINT8 value,
const XMLNODE node = 0 
) const

Get UINT8 variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
INT16 value,
const XMLNODE node = 0 
) const

Get INT16 variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
UINT16 value,
const XMLNODE node = 0 
) const

Get UINT16 variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
int &  value,
const XMLNODE node = 0 
) const

Get 'int' variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
unsigned int &  value,
const XMLNODE node = 0 
) const

Get 'unsigned int' variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
long &  value,
const XMLNODE node = 0 
) const

Get 'long' variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
unsigned long &  value,
const XMLNODE node = 0 
) const

Get 'unsigned long' variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
char *&  value,
const XMLNODE node = 0 
) const

Get char* Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
XMLNODE* MIJOB::FindValue ( const char *  name,
MISTRING value,
const XMLNODE node = 0 
) const

Get string variable Value is left unchanged if content is empty or unrecognized.

Returns:
XML node containing value if found, NULL if not.
Parameters:
name Name of variable
value Value returned
node Parent node or previous list node
void MIJOB::GetBlockingIfExistList ( FILEPATHLIST list  )  const

Get list of filepaths that will block if exist.

void MIJOB::GetBlockingIfNotExistList ( FILEPATHLIST list  )  const

Get list of filepaths that will block if dont exist.

void MIJOB::GetBlockingInputList ( FILEPATHLIST list  )  const

Get list of filepaths used for input, only including those marked as needing to be checked for blocking issues.

void MIJOB::GetBlockingOutputList ( FILEPATHLIST list  )  const

Get list of filepaths used for output, only including those marked as needing to be checked for blocking issues.

void MIJOB::GetDescription ( MISTRING desc  )  const

Get job description.

Parameters:
desc Description string returned
template<typename _ENUMTYPE >
bool MIJOB::GetEnum ( const char *  name,
_ENUMTYPE &  value,
const XMLNODE node = 0 
) const [inline]

Get enum value.

Returns:
true if found, false if not.
Parameters:
name Variable name
value Value returned
node Parent node or previous list node
template<typename _ENUMTYPE >
_ENUMTYPE MIJOB::GetEnumDefaulted ( const char *  name,
_ENUMTYPE  dft,
const XMLNODE node = 0 
) const [inline]

Get enum value with default.

Returns:
Value if found, default if not.
Parameters:
name Variable name
dft Default value
node Parent node or previous list node
void MIJOB::GetGroupID ( MISTRING GroupID  ) 

Get id of group job belongs to.

void MIJOB::GetInputList ( FILEPATHLIST list  )  const

Get list of filepaths used for input, for tooltips.

void MIJOB::GetOutputList ( FILEPATHLIST list  )  const

Get list of filepaths used for output, for tooltips.

const FILEPATH& MIJOB::GetPath (  )  const [inline]

Get path job read from.

INT32 MIJOB::GetPriority (  )  const

Get job priority.

void MIJOB::GetProcess ( MISTRING process  )  const

Get process string.

Parameters:
process Process string returned
XMLNODE* MIJOB::GetRootNode (  )  [inline]

Get root node.

XMLNODE* MIJOB::GetRunParmsNode (  )  [inline]

Get parms node.

template<typename _NUMTYPE >
_NUMTYPE MIJOB::GetValueDefaulted ( const char *  name,
_NUMTYPE  value 
) const [inline]

Get numeric value with default.

Returns:
Value if found or default specified.
Parameters:
name Variable name
value Default value
bool MIJOB::IsTimeToRun (  ) 

For scheduled jobs, check if should run at this time. Must ReadJob first.

bool MIJOB::IsVersionMatch (  ) 

Check if version job file was created for matches current version.

ERRVALUE MIJOB::ReadJob ( const FILEPATH path  ) 

Read existing job file then use GetVariable and GetObject.

Parameters:
path Filepath of job file
ERRVALUE MIJOB::ReadJobNoStatus ( const FILEPATH path  ) 

Read existing job file then use GetVariable and GetObject. Don't start status reporting.

Parameters:
path Filepath of job file
static ERRVALUE MIJOB::ResolveTempJobs (  )  [static]

Make temporary jobs actual jobs.

bool MIJOB::SetGroupID ( const MISTRING GroupID  ) 

Set id of group job belongs to.

Parameters:
GroupID ID of group, call CreateGroup to generate new Group with GroupID
ERRVALUE MIJOB::SetNextTime (  ) 

For scheduled jobs, set the next run time. Must ReadJob first.

void MIJOB::SetReady (  )  [inline]

Set job as "ready" to run.

Used when job is run directly within process instead of writing to file.

ERRVALUE MIJOB::Write ( const FILEPATH directory,
bool  held = false,
FILEPATH path = 0,
bool  bCreateAsTemp = false 
)

Write job file to specific job directory.

Parameters:
directory Directory to create job file in
held True if need to create job as initially held
path Filepath of job file returned
bCreateAsTemp Create as temp group
ERRVALUE MIJOB::Write ( bool  held = false,
FILEPATH path = 0,
bool  bCreateAsTemp = false 
)

Write job file to default job directory.

Parameters:
held True if need to create job as initially held
path Filepath of job file returned
bCreateAsTemp Create as temp group
ERRVALUE MIJOB::WriteDoc (  )  [inline]

Write xmldoc to current path.

ERRVALUE MIJOB::WriteScheduled ( FILEPATH path = 0  ) 

Write schedule job file.

Parameters:
path Filepath of job file returned

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:33:37 2012 for TNTsdk 2012 by  doxygen 1.6.1