XmlTextsFile.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears 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. See the
  13. * GNU General Public License for more details.
  14. */
  15. #pragma once
  16. #include <OgreStringVector.h>
  17. #include "XmlFile.h"
  18. /**
  19. * Handles the main text file/
  20. */
  21. class XmlTextsFile : public XmlFile{
  22. public:
  23. /**
  24. * Constructor.
  25. *
  26. * @param file[in] Path to the main texts file.
  27. */
  28. XmlTextsFile(const Ogre::String& file);
  29. /**
  30. * Destructor.
  31. */
  32. virtual ~XmlTextsFile();
  33. /**
  34. * Retrieves a list of all the available text languages.
  35. *
  36. * @param languages[out] The list of languages will be loaded here.
  37. */
  38. void GetAvailableLanguages(Ogre::StringVector& languages);
  39. /**
  40. * Parses the file and loads all of it's texts.
  41. */
  42. void LoadTexts();
  43. };