vConnectSetting.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * vConnectSetting.h
  3. * Copyright © 2011 HAL, kbinani
  4. *
  5. * This file is part of vConnect-STAND.
  6. *
  7. * org.kbinani.cadencii is free software; you can redistribute it and/or
  8. * modify it under the terms of the GPL License.
  9. *
  10. * org.kbinani.cadencii is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14. #ifndef __vConnectSetting_h__
  15. #define __vConnectSetting_h__
  16. #include <vector>
  17. #include <string>
  18. #include "Map.h"
  19. using namespace std;
  20. using namespace vconnect;
  21. enum vConnectSettingList{
  22. SETTING_BASE = 0,
  23. SETTING_BRIGHTNESS = 1,
  24. SETTING_LOW = 2,
  25. SETTING_HI = 3,
  26. SETTING_END = 4,
  27. };
  28. class librarySetting{
  29. public:
  30. librarySetting(){
  31. enabled = false;
  32. }
  33. bool readSetting( string left, string right );
  34. bool enabled;
  35. string path;
  36. int brightness;
  37. int noteNumber;
  38. double frequency;
  39. };
  40. class vConnectSetting{
  41. public:
  42. vConnectSetting();
  43. ~vConnectSetting();
  44. bool readSetting(string path, string fileName, const char *code);
  45. librarySetting *getLibrarySetting(vConnectSettingList settingKind){return libraryArray[settingKind];}
  46. private:
  47. Map<string, librarySetting*> libraryMap;
  48. vector<librarySetting*> libraryArray;
  49. string path;
  50. };
  51. #endif