C++  1.4.6
CloudBackend Software Development Kit - SDK API for C++
GroupQuery.h
1 /*
2  Copyright © CloudBackend AB 2020 - 2022..
3 */
4 
5 
6 #ifndef INCLUDE_CBE_GROUP_QUERY_H_
7 #define INCLUDE_CBE_GROUP_QUERY_H_
8 
9 #include <string>
10 #include <vector>
11 #include <iostream>
12 
13 #include "CBE/Types.h"
14 #include "CBE/GroupFilter.h"
15 
16 namespace CBE {
17 
18  class GroupQuery {
19  // friend class DirectoryCache;
20  friend class GroupManager;
21  friend class CloudBackend;
22  public:
23 
24  GroupQuery();
25  virtual ~GroupQuery();
26 
28  virtual CBE::GroupFilter filter() const;
29 
36  virtual std::vector<CBE::GroupPtr> getGroupsSnapshot();
37 
39  virtual uint64_t GroupsLoaded();
40 
42  virtual uint64_t totalCount();
43 
45  bool containsGroup(uint64_t groupId);
46 
47  protected:
48 
50  std::vector<CBE::GroupPtr> groups;
51 
53  void initGroups();
54 
55  //The number of Groups in the parent Group on the cloud.
56  uint64_t _totalCount;
57 
58  std::vector< std::pair<uint64_t, uint64_t> > _loadedPages;
59 
60  };
61 }
62 // namespace CBE
63 
64 #endif // INCLUDE_CBE_GROUPQUERY_H_
CBE::GroupQuery::totalCount
virtual uint64_t totalCount()
total Groups in the cloud matching the query result. This may be more than loaded.
CBE::GroupQuery::initGroups
void initGroups()
CBE::GroupQuery::containsGroup
bool containsGroup(uint64_t groupId)
CBE::GroupManager
Definition: GroupManager.h:15
CBE::GroupFilter
Definition: GroupFilter.h:17
CBE::CloudBackend
Definition: CloudBackend.h:26
CBE::GroupQuery::groups
std::vector< CBE::GroupPtr > groups
Definition: GroupQuery.h:50
CBE::GroupQuery::GroupsLoaded
virtual uint64_t GroupsLoaded()
groups loaded in the queryResult.
CBE::GroupQuery
Definition: GroupQuery.h:18
CBE::GroupQuery::getGroupsSnapshot
virtual std::vector< CBE::GroupPtr > getGroupsSnapshot()
CBE::GroupQuery::filter
virtual CBE::GroupFilter filter() const