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

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

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

revision 223 by schoenebeck, Sat Aug 21 11:43:53 2004 UTC revision 397 by senkov, Mon Feb 21 04:28:50 2005 UTC
# Line 66  void LSCPResultSet::Add(String Label, St Line 66  void LSCPResultSet::Add(String Label, St
66          count++;          count++;
67  }  }
68    
69    void LSCPResultSet::Add(String Label, const char* pValue) {
70        Add(Label, String(pValue));
71    }
72    
73    //Add SQL resultset row
74    void LSCPResultSet::Add(int columns, char** argv) {
75            for (int i = 0; i < columns; i++)
76            {
77                    storage += argv[i];
78                    if ((i+1) < columns)
79                            storage += "|";
80            }
81            storage += "\r\n";
82            count = 2; //This result is always multiline.
83    }
84    
85  void LSCPResultSet::Add(int Value) {  void LSCPResultSet::Add(int Value) {
86          Add(ToString(Value));          Add(ToString(Value));
87  }  }
# Line 75  void LSCPResultSet::Add(String Label, in Line 91  void LSCPResultSet::Add(String Label, in
91  }  }
92    
93  void LSCPResultSet::Add(String Label, float Value) {  void LSCPResultSet::Add(String Label, float Value) {
94          std::stringstream ss; //fixme: had issues with template and float?!      char s[1024];
95          ss << Value;      snprintf(s, 1023, "%.3f", Value);
96          Add(Label, ss.str());      Add(Label, String(s));
97  }  }
98    
99  void LSCPResultSet::Add(String Label, bool Value) {  void LSCPResultSet::Add(String Label, bool Value) {

Legend:
Removed from v.223  
changed lines
  Added in v.397

  ViewVC Help
Powered by ViewVC