Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/criteria.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download) (as text)
Wed Nov 24 06:54:21 2004 UTC (19 years, 4 months ago) by youi
Branch: MAIN
File MIME type: text/x-chdr
initial version

1 youi 1.1 /*
2     * SQL実行結果の範囲指定,並べ替え条件を管理するcriteriaクラスの宣言
3     *
4     * $Revision$
5     * $Log$
6     *
7     */
8    
9     #if !defined( CRITERIA_H )
10     #define CRITERIA_H
11     typedef int order_t;
12    
13     class orderby{
14     private:
15     orderby* next;
16     char* column;
17     int order;
18     public:
19     const static order_t ASC = 0;
20     const static order_t DESC = 1;
21    
22     orderby( const char* column, int order );
23     ~orderby( );
24    
25     const char* getColumn( ) const;
26     order_t getOrder( ) const;
27     };
28    
29     class criteria{
30     private:
31     int start; //!< 出力の開始行番号
32     int rows; //!< 出力の行数(0=無制限)
33     orderby** orders; //!< ordersのアドレス配列
34     int ordersMax; //!< orders配列の最大長
35     int ordersLen; //!< orders配列内の有効データ個数
36     int indexOfOrders; //!< orders配列走査用の内部カウンタ
37     public:
38     criteria( );
39     ~criteria( );
40    
41     void setLimit( int start, int rows );
42     void addOrderBy( orderby *order );
43     void clearAll( );
44    
45     int getLimitStart( ) const;
46     int getLimitRows( ) const;
47    
48     const orderby* headOrderBy( );
49     const orderby* nextOrderBy( );
50     };
51     #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26