VR-Forces 4.1.1 Class Documentation
DtSharedAudioSettingsManager.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2012 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
15 
20 
21 #include <string>
22 
23 namespace makVrv
24 {
25 
26  class DtDe;
27 
32  : public DtBaseSharedSettingsManager<DtAudioSettingsRecord,
33  DtSharedAudioSettings>
34  {
35  public:
36 
39  static DtSharedAudioSettingsManager& instance( DtDe& de );
40 
43 
46 
51  virtual void setAudioEnabled( bool val );
52 
57  virtual bool audioEnabled() const;
58 
62  virtual void setVolume( double val );
63 
67  virtual double volume() const;
68 
76  virtual void setSoundRangeEnabled( bool val );
77 
82  virtual bool soundRangeEnabled() const;
83 
89  virtual void setSoundRange( double val );
90 
94  virtual double soundRange() const;
95 
97 
100 
103  virtual unsigned int entityMapSize() const;
104 
107  virtual unsigned int weaponFireMapSize() const;
108 
111  virtual unsigned int detonationMapSize() const;
112 
117  virtual const DtEntitySoundMapRecord&
118  entityMapAt( unsigned int index ) const;
119 
124  virtual const DtEntitySoundMapRecord&
125  weaponFireMapAt( unsigned int index ) const;
126 
131  virtual const DtEntitySoundMapRecord&
132  detonationMapAt( unsigned int index ) const;
133 
137  virtual unsigned int entityMapIndex(
138  const DtEntitySoundMapRecord& record ) const;
139 
143  virtual unsigned int weaponFireMapIndex(
144  const DtFireSoundMapRecord& record ) const;
145 
149  virtual unsigned int detonationMapIndex(
150  const DtDetonationSoundMapRecord& record ) const;
151 
159  virtual void entityMapAdd(
160  const DtEntitySoundMapRecord& record, bool reload = true );
161 
168  virtual void entityMapRemove(
169  const DtEntitySoundMapRecord& record, bool reload = true );
170 
178  virtual void weaponFireMapAdd(
179  const DtFireSoundMapRecord& record, bool reload = false );
180 
187  virtual void weaponFireMapRemove(
188  const DtEntitySoundMapRecord& record, bool reload = false );
189 
197  virtual void detonationMapAdd(
198  const DtDetonationSoundMapRecord& record, bool reload = false );
199 
206  virtual void detonationMapRemove(
207  const DtEntitySoundMapRecord& record, bool reload = false );
208 
210 
213 
218  virtual void setFilename( const std::string& mtlFile );
219 
222  virtual std::string filename() const;
223 
225 
228 
230  boost::signal<void (double)> signal_VolumeUpdated;
231  boost::signal<void (bool)> signal_AudioEnabledUpdated;
232  boost::signal<void (int)> signal_SoundRangeUpdated;
233  boost::signal<void (bool)> signal_SoundRangeEnabledUpdated;
234 
236 
238  virtual void slot_backupRestored( const DtSettingsBackup* s );
239 
240  protected:
241 
243  template <typename ManagerClass>
244  friend ManagerClass& defaultManagerInstanceFunction( DtDe&, bool );
245 
247  template <typename ManagerClass>
248  friend void defaultManagerRegisterInstanceFunction( DtDe&, ManagerClass* );
249 
252  };
253 
254 }

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)