diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llviewquery.h | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/llviewquery.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/linden/indra/llui/llviewquery.h b/linden/indra/llui/llviewquery.h index 2e2b50d..7e947cd 100644 --- a/linden/indra/llui/llviewquery.h +++ b/linden/indra/llui/llviewquery.h | |||
@@ -42,12 +42,12 @@ class LLView; | |||
42 | typedef std::list<LLView *> viewList_t; | 42 | typedef std::list<LLView *> viewList_t; |
43 | typedef std::pair<BOOL, BOOL> filterResult_t; | 43 | typedef std::pair<BOOL, BOOL> filterResult_t; |
44 | 44 | ||
45 | // Abstract base class for all filters. | 45 | // Abstract base class for all query filters. |
46 | class LLQueryFilter | 46 | class LLQueryFilter |
47 | { | 47 | { |
48 | public: | 48 | public: |
49 | virtual ~LLQueryFilter() {}; | 49 | virtual ~LLQueryFilter() {}; |
50 | virtual filterResult_t operator() (const LLView* const view, const viewList_t & children) const =0; | 50 | virtual filterResult_t operator() (const LLView* const view, const viewList_t & children) const = 0; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | class LLQuerySorter | 53 | class LLQuerySorter |
@@ -105,25 +105,28 @@ public: | |||
105 | typedef filterList_t::iterator filterList_iter_t; | 105 | typedef filterList_t::iterator filterList_iter_t; |
106 | typedef filterList_t::const_iterator filterList_const_iter_t; | 106 | typedef filterList_t::const_iterator filterList_const_iter_t; |
107 | 107 | ||
108 | LLViewQuery(); | 108 | LLViewQuery() : mPreFilters(), mPostFilters(), mSorterp() {} |
109 | virtual ~LLViewQuery() {} | 109 | virtual ~LLViewQuery() {} |
110 | 110 | ||
111 | void addPreFilter(const LLQueryFilter* prefilter); | 111 | void addPreFilter(const LLQueryFilter* prefilter) { mPreFilters.push_back(prefilter); } |
112 | void addPostFilter(const LLQueryFilter* postfilter); | 112 | void addPostFilter(const LLQueryFilter* postfilter) { mPostFilters.push_back(postfilter); } |
113 | const filterList_t & getPreFilters() const; | 113 | const filterList_t & getPreFilters() const { return mPreFilters; } |
114 | const filterList_t & getPostFilters() const; | 114 | const filterList_t & getPostFilters() const { return mPostFilters; } |
115 | 115 | ||
116 | void setSorter(const LLQuerySorter* sorter); | 116 | void setSorter(const LLQuerySorter* sorter) { mSorterp = sorter; } |
117 | const LLQuerySorter* getSorter() const; | 117 | const LLQuerySorter* getSorter() const { return mSorterp; } |
118 | 118 | ||
119 | viewList_t run(LLView * view) const; | 119 | viewList_t run(LLView * view) const; |
120 | // syntactic sugar | 120 | // syntactic sugar |
121 | viewList_t operator () (LLView * view) const { return run(view); } | 121 | viewList_t operator () (LLView * view) const { return run(view); } |
122 | protected: | 122 | |
123 | // override this method to provide iteration over other types of children | 123 | // override this method to provide iteration over other types of children |
124 | virtual void filterChildren(LLView * view, viewList_t & filtered_children) const; | 124 | virtual void filterChildren(LLView * view, viewList_t & filtered_children) const; |
125 | |||
126 | private: | ||
127 | |||
125 | filterResult_t runFilters(LLView * view, const viewList_t children, const filterList_t filters) const; | 128 | filterResult_t runFilters(LLView * view, const viewList_t children, const filterList_t filters) const; |
126 | protected: | 129 | |
127 | filterList_t mPreFilters; | 130 | filterList_t mPreFilters; |
128 | filterList_t mPostFilters; | 131 | filterList_t mPostFilters; |
129 | const LLQuerySorter* mSorterp; | 132 | const LLQuerySorter* mSorterp; |
@@ -135,4 +138,4 @@ public: | |||
135 | LLCtrlQuery(); | 138 | LLCtrlQuery(); |
136 | }; | 139 | }; |
137 | 140 | ||
138 | #endif | 141 | #endif // LL_LLVIEWQUERY_H |