ctkModuleValues.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*=============================================================================
  2. Library: CTK
  3. Copyright (c) 2010 Brigham and Women's Hospital (BWH) All Rights Reserved.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =============================================================================*/
  14. #ifndef __ctkModuleValues_h
  15. #define __ctkModuleValues_h
  16. // Qt includes
  17. #include <QVector>
  18. // Module parameter
  19. #include "ctkModuleParameterGroupValue.h"
  20. /**
  21. * Description of the parameters values of a module
  22. *
  23. * The parameters can be used for automated GUI generation or execution
  24. * of the module.
  25. *
  26. * For example:
  27. * - Target: This is the entry point for a shared object module and the full
  28. * command (with path) for an executable.
  29. * - Type: Unknown, SharedObjectModule, CommandLineModule
  30. * - AlternativeTarget: This is the entry
  31. * point for a shared object module and the full command (with path)
  32. * for an executable. The alternative target is used for a second version
  33. * of a module (whose type differs from the primary target,
  34. * executable verses shared object).
  35. * - Location: This is path to the file (shared
  36. * object or executable) for the module
  37. * - AlternativeLocation: This is path to the
  38. * file (shared object or executable) for a second version of the
  39. * module (usually a different type from the primary).
  40. */
  41. class CTK_MODULDESC_EXPORT ctkModuleValues
  42. {
  43. public:
  44. const QVector<ctkModuleParameterGroupValue*>& valueGroups() const;
  45. // Return the group that contain the parameter value associated to the name
  46. ctkModuleParameterGroupValue* valueGroup(const QString& parameterName) const;
  47. // Return the first parameter value corresponding to the name from any group
  48. ctkModuleParameterValue* value(const QString& parameterName) const;
  49. private:
  50. /// Groups of parameters
  51. QVector<ctkModuleParameterGroupValue*> ValueGroups;
  52. };
  53. #endif