home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
Software
/
TemaCD
/
tcvpa
/
data1.cab
/
MyFileGroup
/
INCLUDE
/
tcPSmith.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1999-06-03
|
5KB
|
79 lines
#ifndef _INC_TCPSMITH_HPP
#define _INC_TCPSMITH_HPP
#include <TcCoreEx.hpp>
#include <Def.hpp>
#include <DataServ.hpp>
#include <ProcCtrl.hpp>
#include <CppBind.hpp>
#include <ObjBind.hpp>
#include <Query.hpp>
#include <TxServ.hpp>
#include <UI.hpp>
#define TC_PSMITH tcPSmith()
TC_PS_EXPORT BOOL tcPsAddUserError (TCPsRetCode rc_user, const char * err_msg) ;
TC_PS_EXPORT const char * tcPsErrorString (TCPsRetCode rc) ;
// **********************************************************************
class TC_PS_EXPORT TC_CPSmith
{
private: static TCPsDepthMode m_Depth ;
public: void SetDepth (TCPsDepthMode depth) ;
public: TCPsDepthMode GetDepth () ;
public: TCPsRetCode DSRegister (TC_CPsDataService * ds) ;
public: TC_CPsDataService * DSUnregister (const char * name, BOOL is_del = FALSE) ;
public: TC_CPsTxContext * TxBegin (const char * ds_name, long tx_flag) ;
public: TCPsRetCode TxDestroy (TC_CPsTxContext * tx_cxt=0) ;
public: TCPsRetCode TxResume (TC_CPsTxContext * tx_cxt) ;
public: TC_CPsTxContext * TxSuspend () ;
public: TC_CPsTxContext * TxCurrent () ;
public: TCPsRetCode TxCommit (TCPsTxTerm tx_term = TxTerm_Destroy) ;
public: TCPsRetCode TxRollback (TCPsTxTerm tx_term = TxTerm_Destroy) ;
public: TCPsRetCode CreateObject (TC_CPsObject ** obj, TC_CPsInstID &inst_id) ;
public: TCPsRetCode CreateObject (TC_CPsRef & objRef, TC_CPsInstID &inst_id) ;
public: TCPsRetCode ReleaseObject (TC_CPsObject * obj) ;
public: TCPsRetCode RestoreObject (TC_CPsObject **obj, TC_CPsInstID &inst_id, TCPsDepthMode depth = Depth_Default) ;
public: TCPsRetCode RestoreObject (TC_CPsRef & objRef, TC_CPsInstID &inst_id, TCPsDepthMode depth = Depth_Default) ;
public: TCPsRetCode StoreObject (TC_CPsObject *obj, TCPsDepthMode depth = Depth_Default) ;
public: TC_CPsObject * GetObject (TC_CPsInstID &inst_id) ;
public: TCPsRetCode RemoveObject (TC_CPsObject *obj) ;
public: TCPsRetCode StoreAssoc (TC_CPsObject *obj, const char * attr_name, TCPsDepthMode depth = Depth_Default) ;
public: TCPsRetCode RestoreAssoc (TC_CPsObject *obj, const char * attr_name, TCPsDepthMode depth = Depth_Default) ;
public: TCPsRetCode ReleaseAssoc (TC_CPsObject *obj, const char * attr_name) ;
public: TCPsRetCode RemoveAssoc (TC_CPsObject *obj, const char * attr_name) ;
public: TCPsRetCode AssociateObject (TC_CPsObject * owner, TC_CPsObject * obj, const char * attr_name) ;
public: TCPsRetCode DisassociateObject (TC_CPsObject * owner, TC_CPsObject * obj, const char * attr_name) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CPsResSet & res_set) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CPsAtomicResult & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CPsCollection & cltn) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, long & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, unsigned long & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, short & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, unsigned short & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, char & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, unsigned char & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, float & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, double & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CDate & result) ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CTime & result) TC_PS_THROW_FUNC ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CBCD & result) TC_PS_THROW_FUNC ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CString & result) TC_PS_THROW_FUNC ;
public: TCPsRetCode ExecQuery (TC_CPsQuery & query, TC_CBinArray & result) TC_PS_THROW_FUNC ;
public: BOOL LockObject (TC_CPsObject * obj, TCPsLockMode lock_mode, long timeout = -1) ;
public: BOOL UnlockObject (TC_CPsObject * obj) TC_PS_THROW_FUNC ;
public: TC_CPsCollection * GetCollection (const char * name) ;
public: void TraceObjects (char * title) ;
public: void GetException (TC_CPsException & ex) ;
public: void EnableException (BOOL set) ;
public: BOOL IsExceptionEnabled () ;
public: void SetTrace (long flag, int output = 0) ;
public: long GetTrace () ;
}; // end of class TC_CPSmith
// **********************************************************************
TC_PS_EXPORT TC_CPSmith * tcPSmith () ;
#endif // _INC_TCPSMITH_HPP