cursor.hpp
来自「联通接收发送新程序」· HPP 代码 · 共 71 行
HPP
71 行
/* Copyright(C) 1999, 2000 by JiangSu Bell Software CO.,LTD. */
/*
Name: cursor.hpp Version: 1.0.0
Created by HanBing Date: 2000-08-08
Comment: Our group defining all base-class sets
Modified:
2) 2000-08-28 HanBing - Modifed the class Cursor be array_size;
1) 2000-08-08 HanBing - Create;
*/
#ifndef __CURSOR__
#define __CURSOR__
class Cursor
{
public:
/* constructor */
Cursor()
{
state = closed;
};
/* destructor */
~Cursor()
{
if ( state == opened )
Close();
}
State Open( XW_Connection *conn );
State Close();
/* Justice if the Cursor is opened */
bool IsOpen()
{
return ( state == opened ? true : false );
}
/* bind an input variable */
int BindCol( CField* Field );
/* define an output variable */
int DefineCol( int position, CField* Field );
/* describe the output variable */
int Describe( int position, CField* &Field );
bool Parse( const char *stmt );
inline long Execute( uint size = 1 )
{
n_cur_size = size;
return ReportMsg( oexn( &cda, size, 0 ) );
};
inline long Fetch( uint size = 1 )
{
return ReportMsg( ofen( &cda, size ) );
};
long ReportMsg( int value );
inline void ReportError()
{
connect->ReportError( cda.v2_rc );
}
private:
Cda_Def cda;
XW_Connection *connect;
State state;
uint n_cur_size;
};
#endif //__CURSOR__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?