PackageFile.pkg 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. $#include "PackageFile.h"
  2. struct PackageEntry
  3. {
  4. unsigned offset_ @ offset;
  5. unsigned size_ @ size;
  6. unsigned checksum_ @ checksum;
  7. };
  8. class PackageFile : public Object
  9. {
  10. PackageFile(Context* context);
  11. PackageFile(Context* context, const String fileName);
  12. ~PackageFile();
  13. bool Open(const String fileName);
  14. bool Exists(const String fileName) const;
  15. const PackageEntry* GetEntry(const String fileName) const;
  16. const HashMap<String, PackageEntry>& GetEntries() const;
  17. const String& GetName() const;
  18. StringHash GetNameHash() const;
  19. unsigned GetNumFiles() const;
  20. unsigned GetTotalSize() const;
  21. unsigned GetChecksum() const;
  22. bool IsCompressed() const;
  23. tolua_readonly tolua_property__get_set String& name;
  24. tolua_readonly tolua_property__get_set StringHash nameHash;
  25. tolua_readonly tolua_property__get_set unsigned numFiles;
  26. tolua_readonly tolua_property__get_set unsigned totalSize;
  27. tolua_readonly tolua_property__get_set unsigned checksum;
  28. tolua_readonly tolua_property__is_set bool compressed;
  29. };