00001 #ifndef LUX_API_CONDITION_H
00002 #define LUX_API_CONDITION_H
00003
00004 #include "lux/lux.h"
00005 #include "paging.h"
00006 #include <string>
00007
00008 namespace Lux {
00009
00010 class Paging;
00011
00015 typedef enum {
00016 SORT_SCORE,
00017 SORT_ATTR_INT,
00018 SORT_ATTR_STR,
00019 } sort_attr_t;
00020
00024 typedef enum {
00025 ASC,
00026 DESC,
00027 } sort_order_t;
00028
00032 struct SortCondition {
00036 SortCondition(void) {}
00043 SortCondition(sort_attr_t _attr_type,
00044 sort_order_t _order_type, std::string _attr_name = "");
00045 ~SortCondition(void) {}
00046
00047 sort_attr_t attr_type;
00048 sort_order_t order_type;
00049 std::string attr_name;
00053 uint32_t attr_size;
00054 };
00055
00059 struct Condition {
00063 Condition(void) {}
00069 Condition(SortCondition &_sort, Paging &_paging);
00073 ~Condition(void) {}
00077 SortCondition sort;
00081 Paging paging;
00082 };
00083
00084 }
00085
00086 #endif