~ubuntu-branches/ubuntu/oneiric/dasher/oneiric

« back to all changes in this revision

Viewing changes to Src/DasherCore/NodeCreationManager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-09-18 11:41:58 UTC
  • mfrom: (1.2.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20070918114158-7xrt1bn6dy6dskoi
Tags: 4.6.0-0ubuntu1
* New upstream release:
  - Moving to release series
  - Translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#include "LanguageModelling/MixtureLanguageModel.h"
7
7
#include "NodeCreationManager.h"
8
8
 
9
 
CNodeCreationManager::CNodeCreationManager(Dasher::CDasherInterfaceBase *pInterface, Dasher::CEventHandler *pEventHandler, CSettingsStore *pSettingsStore, bool bGameMode, std::string strGameModeText, Dasher::CAlphIO *pAlphIO) : CDasherComponent(pEventHandler, pSettingsStore) {
10
 
  m_pAlphabetManagerFactory = new CAlphabetManagerFactory(pInterface, pEventHandler, pSettingsStore, pAlphIO, this, bGameMode, strGameModeText);
 
9
 
 
10
CNodeCreationManager::CNodeCreationManager(Dasher::CDasherInterfaceBase *pInterface,
 
11
                                           Dasher::CEventHandler *pEventHandler, 
 
12
                                           CSettingsStore *pSettingsStore,
 
13
                                           Dasher::CAlphIO *pAlphIO) : CDasherComponent(pEventHandler, pSettingsStore) {
 
14
 
 
15
  m_pAlphabetManagerFactory = new CAlphabetManagerFactory(pInterface,
 
16
                                                          pEventHandler,
 
17
                                                          pSettingsStore,
 
18
                                                          pAlphIO,
 
19
                                                          this);
11
20
  
12
21
  m_pLanguageModel = m_pAlphabetManagerFactory->GetLanguageModel();
13
22
  m_pAlphabet = m_pAlphabetManagerFactory->GetAlphabet();
19
28
#else
20
29
  m_pControlManagerFactory = 0;
21
30
#endif
22
 
  m_pConversionManagerFactory = new CConversionManagerFactory(pEventHandler, pSettingsStore, this, iConversionID, pAlphIO, m_pAlphabet);
 
31
  m_pConversionManagerFactory = new CConversionManagerFactory(pEventHandler,
 
32
                                                              pSettingsStore,
 
33
                                                              this,
 
34
                                                              iConversionID,
 
35
                                                              pAlphIO,
 
36
                                                              m_pAlphabet);
23
37
}
24
38
 
25
39
CNodeCreationManager::~CNodeCreationManager() {
 
40
 
 
41
  // C++ standard dictates that
 
42
  // delete NULL;
 
43
  // is totally safe, and does nothing. Do we need all these if statements?
 
44
 
26
45
  if(m_pAlphabetManagerFactory)
27
46
    delete m_pAlphabetManagerFactory;
28
47
  
35
54
 
36
55
 
37
56
CDasherNode *CNodeCreationManager::GetRoot(int iType, Dasher::CDasherNode *pParent, int iLower, int iUpper, void *pUserData ) {
 
57
 
38
58
  switch(iType) {
39
59
  case 0:
40
60
    return m_pAlphabetManagerFactory->GetRoot(pParent, iLower, iUpper, pUserData);