MPQArchive


MPQArchive is the principal class of MPQKit and represents an MPQ archive document.
Superclass: NSObject



MPQArchive is the principal class of MPQKit and represents an MPQ archive document. As such, there is a one-to-one relationship between MPQArchive instances and MPQ archives on disk.

You may create a new MPQArchive instance either with only a file limit parameter, and provide the location of the archive on disk at save time, or create a new MPQArchive with a path and a file limit parameter, in which case the archive file is created right away. The first method better matches the Cocoa document model.

Unlike most other MPQ libraries, MPQArchive has deferred operations, meaning the archive on disk is not modified until you explicitly do so. Again, this behavior better matches the Cocoa document model.

It is important to note that MPQArchive is NOT THREAD SAFE, and as such all access to a particular MPQArchive instance should be protected by a lock in applications where multiple threads may access the same MPQArchive instance.

In addition, MPQArchive makes no check at all to see if other MPQArchive instances exist for a particular archive file. There are obvious coherency issues with having multiple MPQArchive instances refer to the same archive on disk, unless all instances are read-only.



(Last Updated April 02, 2007)
HTML documentation generated by HeaderDoc