File size: 829 Bytes
b6bd94d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* Licensed under GPLv3 or later, see the LICENSE file */

#pragma once

#include "sptr.hh"
#include "dict/dictionary.hh"
#include "instances.hh"

class DictionaryGroup
{
public:
  DictionaryGroup( const std::vector< sptr< Dictionary::Class > > & allDictionaries_,
                   const Instances::Groups & groups_ ):
    allDictionaries( allDictionaries_ ),
    groups( groups_ )
  {
  }

  sptr< Dictionary::Class > getDictionaryByName( const QString & dictionaryName );

  const std::vector< sptr< Dictionary::Class > > * getActiveDictionaries( unsigned groupId );

  sptr< Dictionary::Class > getDictionaryById( const std::string & dictId );

  const Instances::Group * getGroupById( unsigned groupId );


private:
  const std::vector< sptr< Dictionary::Class > > & allDictionaries;
  const Instances::Groups & groups;
};