SubfileData.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // Created by Иван_Архипов on 06.12.2017.
  3. //
  4. #ifndef LOTRO_DAT_LIBRARY_SUBFILEDATA_H
  5. #define LOTRO_DAT_LIBRARY_SUBFILEDATA_H
  6. #include <string>
  7. #include <yaml-cpp/yaml.h>
  8. #include "BinaryData.h"
  9. namespace LOTRO_DAT {
  10. struct SubfileData {
  11. public:
  12. SubfileData() {
  13. binary_data = BinaryData();
  14. text_data = std::u16string();
  15. options = YAML::Node();
  16. }
  17. SubfileData(const BinaryData &binary_data_, const std::u16string &text_data_, const YAML::Node options_) {
  18. binary_data = binary_data_;
  19. text_data = text_data_;
  20. options = options_;
  21. }
  22. bool operator == (const SubfileData &other) {
  23. return binary_data == other.binary_data && text_data == other.text_data;
  24. }
  25. bool operator != (const SubfileData &other) {
  26. return !(*this == other);
  27. }
  28. public:
  29. BinaryData binary_data;
  30. std::u16string text_data;
  31. YAML::Node options;
  32. };
  33. }
  34. #endif //LOTRO_DAT_LIBRARY_SUBFILEDATA_H