~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to backend/wbpublic/grtdb/db_object_master_filter.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License as
 
6
 * published by the Free Software Foundation; version 2 of the
 
7
 * License.
 
8
 * 
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
12
 * GNU General Public License for more details.
 
13
 * 
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
17
 * 02110-1301  USA
 
18
 */
 
19
#ifndef _DB_OBJECT_MASTER_FILTER_BE_H_
 
20
#define _DB_OBJECT_MASTER_FILTER_BE_H_
 
21
 
 
22
 
 
23
#include "grt/grt_manager.h"
 
24
 
 
25
#include "grts/structs.db.h"
 
26
#include "grts/structs.db.mgmt.h"
 
27
 
 
28
#include "wbpublic_public_interface.h"
 
29
 
 
30
 
 
31
namespace bec {
 
32
 
 
33
  class DBObjectFilterBE;
 
34
 
 
35
  class WBPUBLICBACKEND_PUBLIC_FUNC DBObjectMasterFilterBE
 
36
  {
 
37
  public:
 
38
    DBObjectMasterFilterBE(GRTManager *grtm);
 
39
 
 
40
    void add_filter(DBObjectFilterBE *filter);
 
41
    void remove_all_filters();
 
42
 
 
43
    void add_stored_filter_set(const std::string &name, std::list<std::string> &names);
 
44
    void remove_stored_filter_set(int index);
 
45
    void load_stored_filter_set(int index, std::list<int> &indexes);
 
46
    void load_stored_filter_set_list(std::list<std::string> &names);
 
47
 
 
48
  protected:
 
49
    GRTManager *_grtm;
 
50
    std::vector<DBObjectFilterBE *> _filters;
 
51
    grt::DictRef _stored_master_filter_sets;
 
52
    std::string _stored_master_filter_sets_filepath;
 
53
  };
 
54
 
 
55
};
 
56
 
 
57
 
 
58
#endif /* _DB_OBJECT_MASTER_FILTER_BE_H_ */