/[svn]/linuxsampler/trunk/src/common/IDGenerator.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/common/IDGenerator.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2135 - (show annotations) (download) (as text)
Thu Sep 30 20:00:43 2010 UTC (13 years, 7 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1037 byte(s)
* added and implemented a set of 19 new LSCP commands for controlling
  internal effects:
  - added LSCP command "GET AVAILABLE_EFFECTS"
  - added LSCP command "LIST AVAILABLE_EFFECTS"
  - added LSCP command "GET EFFECT INFO <effect-index>"
  - added LSCP command "CREATE EFFECT_INSTANCE <effect-index>"
  - added LSCP command
    "CREATE EFFECT_INSTANCE <effect-system> <module> <effect-name>"
  - added LSCP command "DESTROY EFFECT_INSTANCE <effect-instance>"
  - added LSCP command "GET EFFECT_INSTANCES"
  - added LSCP command "LIST EFFECT_INSTANCES"
  - added LSCP command "GET EFFECT_INSTANCE INFO <effect-instance>"
  - added LSCP command "GET EFFECT_INSTANCE_INPUT_CONTROL INFO
    <effect-instance> <input-control>"
  - added LSCP command "SET EFFECT_INSTANCE_INPUT_CONTROL <effect-instance>
    <input-control> <value>"
  - added LSCP command "GET MASTER_EFFECT_CHAINS <audio-device>"
  - added LSCP command "LIST MASTER_EFFECT_CHAINS <audio-device>"
  - added LSCP command "ADD MASTER_EFFECT_CHAIN <audio-device>"
  - added LSCP command
    "REMOVE MASTER_EFFECT_CHAIN <audio-device> <effect-chain>"
  - added LSCP command
    "GET MASTER_EFFECT_CHAIN INFO <audio-device> <effect-chain>"
  - added LSCP command "APPEND MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance>"
  - added LSCP command "INSERT MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance> <effect-chain-pos>"
  - added LSCP command "REMOVE MASTER_EFFECT_CHAIN EFFECT <audio-device>
    <effect-chain> <effect-instance>"
* bumped version to 1.0.0.cvs7

1 #ifndef LS_IDGENERATOR_H
2 #define LS_IDGENERATOR_H
3
4 #include <set>
5
6 namespace LinuxSampler {
7
8 /**
9 * Generates unique numerical IDs starting from zero.
10 *
11 * @e Note: this class is not exported to the C++ API of the sampler!
12 */
13 class IDGenerator {
14 public:
15 /**
16 * Constructor.
17 *
18 * @param simpleAlgorithm - if false, all created IDs which are still in
19 * use will be remembered, if true then IDs are
20 * simply generated by incrementing an int variable
21 * by 1 until the whole int value range was used
22 */
23 IDGenerator(bool simpleAlgorithm = false);
24
25 /**
26 * Returns new unique positive ID of at least zero, a negative number if
27 * no free ID could be generated.
28 */
29 int create();
30
31 /**
32 * Free the given ID, for being re-used in future.
33 */
34 void destroy(int id);
35
36 private:
37 std::set<int> ids;
38 int previousId;
39 bool simple;
40 };
41
42 } // namespace LinuxSampler
43
44 #endif // LS_IDGENERATOR_H

  ViewVC Help
Powered by ViewVC