/[svn]/linuxsampler/trunk/src/network/lscpevent.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpevent.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 552 by schoenebeck, Wed May 18 10:49:58 2005 UTC revision 1686 by schoenebeck, Thu Feb 14 14:58:50 2008 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6     *   Copyright (C) 2005 - 2008 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 31  Line 32 
32    
33  #include "lscpevent.h"  #include "lscpevent.h"
34    
35    #include "../common/global_private.h"
36    
37  std::map<LSCPEvent::event_t, String> LSCPEvent::EventNames = std::map<LSCPEvent::event_t, String>();  std::map<LSCPEvent::event_t, String> LSCPEvent::EventNames = std::map<LSCPEvent::event_t, String>();
38    
39  LSCPEvent::LSCPEvent(String eventName) throw (LinuxSamplerException) {  LSCPEvent::LSCPEvent(String eventName) throw (Exception) {
40          for (std::map<event_t, String>::iterator iter = EventNames.begin(); iter != EventNames.end(); iter++) {          for (std::map<event_t, String>::iterator iter = EventNames.begin(); iter != EventNames.end(); iter++) {
41                  if (iter->second == eventName) {                  if (iter->second == eventName) {
42                          this->type = iter->first;                          this->type = iter->first;
43                          return;                          return;
44                  }                  }
45          }          }
46          throw LinuxSamplerException("Event does not exist");          throw Exception("Event does not exist");
47  }  }
48    
49  LSCPEvent::LSCPEvent(event_t eventType, int uiData) {  LSCPEvent::LSCPEvent(event_t eventType, int uiData) {
# Line 63  LSCPEvent::LSCPEvent(event_t eventType, Line 66  LSCPEvent::LSCPEvent(event_t eventType,
66          this->storage = sData + " " + ToString(uiData);          this->storage = sData + " " + ToString(uiData);
67  }  }
68    
69    LSCPEvent::LSCPEvent(event_t eventType, String sData, double dData) {
70            this->type = eventType;
71            this->storage = sData + " " + ToString(dData);
72    }
73    
74  LSCPEvent::LSCPEvent(event_t eventType, int uiData, String sData) {  LSCPEvent::LSCPEvent(event_t eventType, int uiData, String sData) {
75          this->type = eventType;          this->type = eventType;
76          this->storage = ToString(uiData) + " " + sData;          this->storage = ToString(uiData) + " " + sData;
77  }  }
78    
79    LSCPEvent::LSCPEvent(event_t eventType, int uiData1, String sData2, int uiData3, int uiData4) {
80            this->type = eventType;
81            this->storage = ToString(uiData1) + " " + sData2 + " " +
82                            ToString(uiData3) + " " + ToString(uiData4);
83    }
84    
85    LSCPEvent::LSCPEvent(event_t eventType, int uiData1, int uiData2, int uiData3) {
86            this->type = eventType;
87            this->storage = ToString(uiData1) + " " + ToString(uiData2) + " " + ToString(uiData3);
88    }
89    
90    LSCPEvent::LSCPEvent(event_t eventType, String sData1, String sData2, String sData3) {
91            this->type = eventType;
92            this->storage = sData1 + " " + sData2 + " " + sData3;
93    }
94    
95  //Produce event string  //Produce event string
96  String LSCPEvent::Produce(void) {  String LSCPEvent::Produce(void) {
97          String result = "NOTIFY:";          String result = "NOTIFY:";

Legend:
Removed from v.552  
changed lines
  Added in v.1686

  ViewVC Help
Powered by ViewVC