string.h 854 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2009-2021 Intel Corporation
  2. // SPDX-License-Identifier: Apache-2.0
  3. #pragma once
  4. #include "platform.h"
  5. #include "../math/vec2.h"
  6. #include "../math/vec3.h"
  7. #include "../math/vec4.h"
  8. namespace embree
  9. {
  10. class IOStreamStateRestorer
  11. {
  12. public:
  13. IOStreamStateRestorer(std::ostream& iostream)
  14. : iostream(iostream), flags(iostream.flags()), precision(iostream.precision()) {
  15. }
  16. ~IOStreamStateRestorer() {
  17. iostream.flags(flags);
  18. iostream.precision(precision);
  19. }
  20. private:
  21. std::ostream& iostream;
  22. std::ios::fmtflags flags;
  23. std::streamsize precision;
  24. };
  25. std::string toLowerCase(const std::string& s);
  26. std::string toUpperCase(const std::string& s);
  27. Vec2f string_to_Vec2f ( std::string str );
  28. Vec3f string_to_Vec3f ( std::string str );
  29. Vec4f string_to_Vec4f ( std::string str );
  30. }