C# Class Nanook.QueenBee.Parser.QbFile

Afficher le fichier Open project: Nanook/Queen-Bee Class Usage Examples

Méthodes publiques

Méthode Description
AddItem ( QbItemBase item ) : void
AlignPointers ( ) : void
CreateGenericArrayItem ( QbItemBase parent ) : GenericQbItem

Creates an array item based on the data type of the parent.

CreateQbItemType ( QbFile qbFile, QbItemType type ) : QbItemBase
CreateQbItemType ( QbFile qbFile, QbItemType type, QbFormat qbFormat ) : QbItemBase
FindItem ( QbItemType type, bool recursive ) : QbItemBase
FindItem ( QbKey key, bool recursive ) : QbItemBase
FindItem ( bool recursive, Predicate match ) : QbItemBase
FormatBadPointerExceptionMessage ( object sender, uint streamPos, uint pointer ) : string
FormatIsValidErrorMessage ( QbItemBase item, IsValidReturnType errorType ) : string
FormatWriteLengthExceptionMessage ( object sender, uint start, uint end, uint length ) : string
GetGenericItems ( QbItemBase item ) : List

Analyse the attributes on the item and return the editable items

InsertItem ( QbItemBase item, QbItemBase sibling, bool beforeAfter ) : void

Insert a new item before or after the sibling item.

IsValid ( ) : QbItemBase
QbFile ( Stream stream, PakFormat pakFormat ) : System
QbFile ( Stream stream, string debugFileContents, PakFormat pakFormat ) : System
QbFile ( string filename, PakFormat pakFormat ) : System
QbFile ( string filename, string debugFilename, PakFormat pakFormat ) : System
QbFile ( string filename, string debugFileContents, Stream stream, PakFormat pakFormat ) : System

Open using a stream, filename is just for reference. The stream must start with the file (the position is depended on)

RemoveItem ( QbItemBase item ) : void

Remove the specified item from this items children

SetGenericItems ( QbItemBase item, List gItems ) : void
SetNewFileId ( ) : void

The FileId is based on the filename, this will recalculate it, GH3 has a bug where the first character is missing from the path. The FileId doesn't appear to affect the game, it may just need to be unique

SupportedChildTypes ( QbItemType parent ) : QbItemType[]
SupportsChild ( QbItemType parent, QbItemType child ) : bool
Write ( Stream s ) : void
Write ( string filename ) : void

Private Methods

Méthode Description
LookupDebugName ( uint debugCrc ) : string
LookupDebugName ( uint debugCrc, bool allowUserQbkeyLookup ) : string
QbFile ( ) : System
QbFile ( string qbFilename, PakFormat pakFormat, uint magic, byte unknownData ) : System

Create a blank QbFile

SearchItems ( QbFile qbFile, List qibs, bool recursive, Predicate match ) : QbItemBase
StreamPos ( Stream stream ) : uint

Subtracts the start offset of the stream from current position

createQbItemType ( QbFile qbFile, QbItemType type, QbFormat qbFormat, bool hasQbFormat ) : QbItemBase
loadDebugFile ( string debugFileContents ) : void
parse ( Stream stream ) : void
recurseIsValid ( QbItemBase item ) : QbItemBase
startLengthCheck ( BinaryEndianWriter bw ) : void
testLengthCheck ( object sender, BinaryEndianWriter bw ) : ApplicationException

Method Details

AddItem() public méthode

public AddItem ( QbItemBase item ) : void
item QbItemBase
Résultat void

AlignPointers() public méthode

public AlignPointers ( ) : void
Résultat void

CreateGenericArrayItem() public static méthode

Creates an array item based on the data type of the parent.
public static CreateGenericArrayItem ( QbItemBase parent ) : GenericQbItem
parent QbItemBase Must be a simple array type
Résultat GenericQbItem

CreateQbItemType() public static méthode

public static CreateQbItemType ( QbFile qbFile, QbItemType type ) : QbItemBase
qbFile QbFile
type QbItemType
Résultat QbItemBase

CreateQbItemType() public static méthode

public static CreateQbItemType ( QbFile qbFile, QbItemType type, QbFormat qbFormat ) : QbItemBase
qbFile QbFile
type QbItemType
qbFormat QbFormat
Résultat QbItemBase

FindItem() public méthode

public FindItem ( QbItemType type, bool recursive ) : QbItemBase
type QbItemType
recursive bool
Résultat QbItemBase

FindItem() public méthode

public FindItem ( QbKey key, bool recursive ) : QbItemBase
key QbKey
recursive bool
Résultat QbItemBase

FindItem() public méthode

public FindItem ( bool recursive, Predicate match ) : QbItemBase
recursive bool
match Predicate
Résultat QbItemBase

FormatBadPointerExceptionMessage() public static méthode

public static FormatBadPointerExceptionMessage ( object sender, uint streamPos, uint pointer ) : string
sender object
streamPos uint
pointer uint
Résultat string

FormatIsValidErrorMessage() public static méthode

public static FormatIsValidErrorMessage ( QbItemBase item, IsValidReturnType errorType ) : string
item QbItemBase
errorType IsValidReturnType
Résultat string

FormatWriteLengthExceptionMessage() public static méthode

public static FormatWriteLengthExceptionMessage ( object sender, uint start, uint end, uint length ) : string
sender object
start uint
end uint
length uint
Résultat string

GetGenericItems() public static méthode

Analyse the attributes on the item and return the editable items
public static GetGenericItems ( QbItemBase item ) : List
item QbItemBase
Résultat List

InsertItem() public méthode

Insert a new item before or after the sibling item.
public InsertItem ( QbItemBase item, QbItemBase sibling, bool beforeAfter ) : void
item QbItemBase Item to insert.
sibling QbItemBase
beforeAfter bool Insert before=True or after=False
Résultat void

IsValid() public méthode

public IsValid ( ) : QbItemBase
Résultat QbItemBase

QbFile() public méthode

public QbFile ( Stream stream, PakFormat pakFormat ) : System
stream Stream
pakFormat PakFormat
Résultat System

QbFile() public méthode

public QbFile ( Stream stream, string debugFileContents, PakFormat pakFormat ) : System
stream Stream
debugFileContents string
pakFormat PakFormat
Résultat System

QbFile() public méthode

public QbFile ( string filename, PakFormat pakFormat ) : System
filename string
pakFormat PakFormat
Résultat System

QbFile() public méthode

public QbFile ( string filename, string debugFilename, PakFormat pakFormat ) : System
filename string
debugFilename string
pakFormat PakFormat
Résultat System

QbFile() public méthode

Open using a stream, filename is just for reference. The stream must start with the file (the position is depended on)
public QbFile ( string filename, string debugFileContents, Stream stream, PakFormat pakFormat ) : System
filename string
debugFileContents string
stream Stream
pakFormat PakFormat
Résultat System

RemoveItem() public méthode

Remove the specified item from this items children
public RemoveItem ( QbItemBase item ) : void
item QbItemBase Item to remove
Résultat void

SetGenericItems() public static méthode

public static SetGenericItems ( QbItemBase item, List gItems ) : void
item QbItemBase
gItems List
Résultat void

SetNewFileId() public méthode

The FileId is based on the filename, this will recalculate it, GH3 has a bug where the first character is missing from the path. The FileId doesn't appear to affect the game, it may just need to be unique
public SetNewFileId ( ) : void
Résultat void

SupportedChildTypes() public static méthode

public static SupportedChildTypes ( QbItemType parent ) : QbItemType[]
parent QbItemType
Résultat QbItemType[]

SupportsChild() public static méthode

public static SupportsChild ( QbItemType parent, QbItemType child ) : bool
parent QbItemType
child QbItemType
Résultat bool

Write() public méthode

public Write ( Stream s ) : void
s Stream
Résultat void

Write() public méthode

public Write ( string filename ) : void
filename string
Résultat void