FloatAttribute.cpp 483 B

123456789101112131415161718192021222324252627282930
  1. #include "main.h"
  2. #include "attributes.h"
  3. _float::_float()
  4. {
  5. value = 0;
  6. }
  7. _float::_float(float defaultValue)
  8. {
  9. value = defaultValue;
  10. }
  11. intptr_t _float::operator =(intptr_t uintValue)
  12. {
  13. value = static_cast<float>(uintValue);
  14. return static_cast<intptr_t>(value);
  15. }
  16. float _float::operator =(float uintValue)
  17. {
  18. value = uintValue;
  19. return value;
  20. }
  21. #define CBCLASS _float
  22. START_DISPATCH;
  23. CB(IFC_CONFIGITEM_GETINT, GetInt)
  24. CB(IFC_CONFIGITEM_GETFLOAT, GetFloat)
  25. END_DISPATCH;