C# 클래스 SWFProcessing.SWFModeller.ABC.AbcCode

Represents parsed ABC bytecode, and all that it contains.
파일 보기 프로젝트 열기: WeeWorld/Swiffotron 1 사용 예제들

공개 메소드들

메소드 설명
AbcCode ( ) : System

Initializes a new instance of the AbcCode class.

AddClass ( AS3ClassDef c ) : void

Adds a class to the code.

AddMetadata ( string group, string key, string value ) : void

Add some metadata to this bytecode block.

AddMultiname ( Multiname mn ) : void

Adds a multiname to the code.

AddNamespaceSet ( NamespaceSet set ) : void

Adds a set to the code.

GenerateClipClassBindingScript ( Sprite spr ) : void

Generates a script that binds a class to a clip.

GetClass ( int idx ) : AS3ClassDef

Gets a class from a class index.

GetNamespaceSet ( int idx ) : NamespaceSet

Gets a set from a set index.

MethodProc ( MethodProcessor mp ) : void

Run code on all methods in this code

비공개 메소드들

메소드 설명
AddNamespace ( Namespace ns ) : void
AddScript ( Script s ) : void

Adds a script to the code.

CreateClass ( ) : AS3ClassDef
CreateMethod ( string sourceFile, uint maxStack, uint localCount, uint initScopeDepth, uint maxScopeDepth ) : Method
CreateMultiname ( Multiname kind, string name, Namespace ns, NamespaceSet set ) : Multiname
CreateNamespace ( Namespace kind, string name, string prefix = null ) : Namespace
CreateNamespaceSet ( Namespace nsRefs ) : NamespaceSet
Disassemble ( ) : void

When reading code, references to things like functions and methods are all done with indices into arrays. This is a bit restrictive, so after the code is loaded, a call to this will transform all the code to use object references. E.g a reference to constant string number 7, will become a string obejct. This is a first step towards merging abc files together.

GetClassByQName ( string className ) : AS3ClassDef
GetMetadata ( string key ) : string>.Dictionary

Gets the metadata associated with a key

GetMethod ( int idx ) : Method

Gets a method at a given index

GetMultiname ( int idx ) : Multiname
GetNamespace ( int idx ) : Namespace
MarkCodeAsTampered ( ) : void

At first glance, this does the same as Disassemble(). The difference is that merely disassembling the code doesn't clear out the bytecode that was disassembled. Marking code as tampered disassembles it and then discards the source bytecode, forcing it to require reassembly.

Op ( Opcode mnemonic ) : Opcode

Technically, from an OO perspective, this isn't the most logical place for this method. It's a factory method for opcodes used when building up new methods, bytecode by bytecode. It's here because this is the place that makes calling it require the least typing, which is good when you're creating lists of loads of these things.

SetClasses ( AS3ClassDef as3Classes ) : void

Replaces the classes with a new set of classes

SetDoubleCount ( uint count ) : void

Creates a new, sized double constant array

SetIntCount ( uint count ) : void

Creates a new, sized integer constant array

SetMethods ( Method methods ) : void

Replaces the methods with a new set of methods

SetMultinames ( Multiname multinames ) : void
SetNamespaceSets ( NamespaceSet sets ) : void
SetNamespaces ( Namespace namespaces ) : void
SetStringCount ( uint count ) : void

Creates a new, sized string constant array

SetUintCount ( uint count ) : void

Creates a new, sized unsigned integer constant array

ToStringModelView ( int nest, StringBuilder sb ) : void

메소드 상세

AbcCode() 공개 메소드

Initializes a new instance of the AbcCode class.
public AbcCode ( ) : System
리턴 System

AddClass() 공개 메소드

Adds a class to the code.
public AddClass ( AS3ClassDef c ) : void
c AS3ClassDef The class to add.
리턴 void

AddMetadata() 공개 메소드

Add some metadata to this bytecode block.
public AddMetadata ( string group, string key, string value ) : void
group string Data group name
key string Data key name
value string The data value
리턴 void

AddMultiname() 공개 메소드

Adds a multiname to the code.
public AddMultiname ( Multiname mn ) : void
mn Multiname The multiname to add.
리턴 void

AddNamespaceSet() 공개 메소드

Adds a set to the code.
public AddNamespaceSet ( NamespaceSet set ) : void
set NamespaceSet The set to add.
리턴 void

GenerateClipClassBindingScript() 공개 메소드

Generates a script that binds a class to a clip.
public GenerateClipClassBindingScript ( Sprite spr ) : void
spr SWFProcessing.SWFModeller.Characters.Sprite The sprite to create the class for.
리턴 void

GetClass() 공개 메소드

Gets a class from a class index.
public GetClass ( int idx ) : AS3ClassDef
idx int The index of the class, usually found as a parameter /// on some ABC opcode.
리턴 AS3ClassDef

GetNamespaceSet() 공개 메소드

Gets a set from a set index.
public GetNamespaceSet ( int idx ) : NamespaceSet
idx int The index of the set, usually found as a parameter /// on some ABC opcode.
리턴 NamespaceSet

MethodProc() 공개 메소드

Run code on all methods in this code
public MethodProc ( MethodProcessor mp ) : void
mp MethodProcessor A delegate to run on each method.
리턴 void