PackageFile.pkg 1.0 KB

1234567891011121314151617181920212223242526272829303132
  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. virtual ~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. tolua_readonly tolua_property__get_set String& name;
  23. tolua_readonly tolua_property__get_set StringHash nameHash;
  24. tolua_readonly tolua_property__get_set unsigned numFiles;
  25. tolua_readonly tolua_property__get_set unsigned totalSize;
  26. tolua_readonly tolua_property__get_set unsigned checksum;
  27. };