com.altair.hwm.beans.hm
Class HMEvalTCLProcComm

java.lang.Object
  extended by com.altair.hwm.beans.hm.HMEvalTCLProcComm

public class HMEvalTCLProcComm
extends java.lang.Object

Title: HMEvalTCLProcComm

Description: This class provides the functionality of creating TCL procedures and executing them in HyperMesh.This can be used by beans that needs the functionality of HMEvalTCLProcComm bean but not its UI.

Company: Altair Engineering, Inc.


Constructor Summary
HMEvalTCLProcComm(HWMCommMgr hwmCommMgr)
          Constructor.
 
Method Summary
 void CreateProcedure(java.lang.String strSessionName, java.lang.String strProcName, java.lang.String strProcedure)
          Creates the function using HWMComm and if it fails....
 java.lang.Object EvalTclCommand(java.lang.String strSessionName, java.lang.String strTclCommand, boolean bParse)
          Executes a Tcl command and returns either the string or parsed result as a vector depending on bParse
 java.lang.Object EvalTCLProc(java.lang.String strSessionName, java.lang.String[] arrstrProcNames, java.lang.String[] arrstrProcedures, java.lang.String strMainProcName, boolean bParseResult)
          This creates all the procedures passed as an array on the HM side and then calls the main procedure and returns a String
 java.lang.Object EvalTCLProc(java.lang.String strSessionName, java.lang.String strProcedure, java.lang.String strProcName, boolean bParseResult)
          This creates the procedure on the HM side and then invokes it and returns a String
 java.lang.Object ExecuteProcedure(java.lang.String strSessionName, java.lang.String strMainProcName, boolean bParse)
          Executes the main procedure and returns either the string or parsed result as a vector depending on bParse
 void ExecuteTclCommand(java.lang.String strSessionName, java.lang.String strTclCommand)
          Executes a Tcl command and returns either the string or parsed result as a vector depending on bParse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HMEvalTCLProcComm

public HMEvalTCLProcComm(HWMCommMgr hwmCommMgr)
Constructor.

Parameters:
hwmCommMgr - The communication manager wqhich facilitates the communication with HM
Method Detail

EvalTCLProc

public java.lang.Object EvalTCLProc(java.lang.String strSessionName,
                                    java.lang.String[] arrstrProcNames,
                                    java.lang.String[] arrstrProcedures,
                                    java.lang.String strMainProcName,
                                    boolean bParseResult)
                             throws java.lang.Exception
This creates all the procedures passed as an array on the HM side and then calls the main procedure and returns a String

Parameters:
strSessionName - Session name to use for communicating with HM
arrstrProcNames - array of procedures naes that are present in arrstrProcedures
arrstrProcedures - array of procedures to be created on the HM Side
strMainProcName - The main procedure name that will be invoked
bParseResult - If true, the result is parsed and returned as a vector else the result is a String
Returns:
Object if bParseResult is true then a Vector else a String
Throws:
java.lang.Exception - thrown if the command fails. "getMessage" will give the description of the error that occured

EvalTCLProc

public java.lang.Object EvalTCLProc(java.lang.String strSessionName,
                                    java.lang.String strProcedure,
                                    java.lang.String strProcName,
                                    boolean bParseResult)
                             throws java.lang.Exception
This creates the procedure on the HM side and then invokes it and returns a String

Parameters:
strSessionName - Session name to use for communicating with HM
strProcedure - The procedure to be create on the HM Side
strProcName - The name of the procedure to invoke
bParseResult - If true, the result is parsed and returned as a vector else the result is a String
Returns:
Object if bParseResult is true then a Vector else a String
Throws:
java.lang.Exception - thrown if the command fails. "getMessage" will give the description of the error that occured

CreateProcedure

public void CreateProcedure(java.lang.String strSessionName,
                            java.lang.String strProcName,
                            java.lang.String strProcedure)
                     throws java.lang.Exception
Creates the function using HWMComm and if it fails.... throws an exception

Parameters:
strSessionName - Session name to use for communicating with HM
strProcName - The TCL procedure name
strProcedure - The TCL procedure as a string
Throws:
java.lang.Exception

ExecuteProcedure

public java.lang.Object ExecuteProcedure(java.lang.String strSessionName,
                                         java.lang.String strMainProcName,
                                         boolean bParse)
                                  throws java.lang.Exception
Executes the main procedure and returns either the string or parsed result as a vector depending on bParse

Parameters:
strSessionName - Session name to use for communicating with HM
strMainProcName - The main TCL procedure which should be invoked.
bParse - If true, the result from HyperMesh is parsed
Throws:
java.lang.Exception

EvalTclCommand

public java.lang.Object EvalTclCommand(java.lang.String strSessionName,
                                       java.lang.String strTclCommand,
                                       boolean bParse)
                                throws java.lang.Exception
Executes a Tcl command and returns either the string or parsed result as a vector depending on bParse

Parameters:
strSessionName - Session name to use for communicating with HM
strTclCommand - The TCL command to execute
bParse - If true, the result from HyperMesh is parsed
Throws:
java.lang.Exception

ExecuteTclCommand

public void ExecuteTclCommand(java.lang.String strSessionName,
                              java.lang.String strTclCommand)
                       throws java.lang.Exception
Executes a Tcl command and returns either the string or parsed result as a vector depending on bParse

Parameters:
strSessionName - Session name to use for communicating with HM
strTclCommand - The TCL command to execute
bParse - If true, the result from HyperMesh is parsed
Throws:
java.lang.Exception