Shadow Network Framework  0.0.2-alpha
.NET Client Library for Shadow Network Framework
Loading...
Searching...
No Matches
SNFClient.OPCode.Member Class Reference

Objects of this class Defines every OPCode instance. More...

Public Types

enum  Rank { Category , SubCategory , Command , Detail }
 Defines the Ranks of Members. More...
 

Public Member Functions

 Member (Rank Rank, byte Value, string Definition)
 Creates a new Member instance.
 
Member clone ()
 Clones the Member.
 
void InvokeCommandCB (Request Rqst)
 Invoke the Command's Callback.
 

Static Public Member Functions

static Member getCategory (byte Category)
 Gets an Instace of a Saved Category.
 
static Member getSubCategory (byte Category, byte SubCategory)
 Gets a Subcategory Member depending on a byte according to the byte of Category.
 
static Member getSubCategory (Member Category, byte SubCategory)
 Gets a Subcategory Member depending on a byte from a Category member.
 
static Member getCommand (byte Category, byte SubCategory, byte Command)
 Gets a Command Member depending on a byte accoring to the bytes of Category and SubCategory.
 
static Member getCommand (Member SubCategory, byte Command)
 Gets a Command Member depending on a byte from a Subcategory Member.
 
static Member getDetail (byte Category, byte SubCategory, byte Command, byte Detail)
 Gets a Detail Member depending on a byte accoring to the bytes of Category, SubCategory and Command.
 
static Member getDetail (Member Command, byte Detail)
 Gets a Detail Member depending on a byte from a Command Member.
 
static bool AddCategory (byte Category, string Definition)
 Adds a new Category into the OPCode structure.
 
static bool AddCategory (Member Category)
 Adds a Category into the OPCode structure.
 
static bool AddSubCategory (Member Category, byte SubCategory, string Definition)
 Adds a new Subcategory into the OPCode Structure.
 
static bool AddSubCategory (Member Category, Member SubCategory)
 Adds a Subcategory into the OPCode Structure.
 
static bool AddCommand (Member SubCategory, byte Command, string Definition, RequestCB OnServerCall=null)
 Adds a new Command into the OPCode structure.
 
static bool AddCommand (Member SubCategory, Member Command, RequestCB OnServerCall=null)
 Adds a Command into the OPCode structure.
 
static bool AddDetail (Member Command, byte Detail, string Definition)
 Adds a new Detail into the OPCode structure.
 
static bool AddDetail (Member Command, Member Detail)
 Adds a Detail into the OPCode structure.
 

Properties

static LinkedList< MemberCategories [get]
 Gets The Saved Categories ( Or the Structure of the Registred OPCodes )
 
Rank MemberRank [get]
 Returns the Member's Rank.
 
byte Value [get]
 Returns The Member's Byte Value.
 
string Definition [get]
 Returns The Member's Definition.
 
LinkedList< MemberSub [get]
 Returns The Member's Sub Members.
 
RequestCB CommandCB [set]
 Sets the function to be called when the server Sends a Server Request.
 

Detailed Description

Objects of this class Defines every OPCode instance.

Member Enumeration Documentation

◆ Rank

Defines the Ranks of Members.

Enumerator
Category 

The Category of the OPCode.

SubCategory 

The Subcategory of the OPCode.

Command 

The Command of the OPCode.

Detail 

The Detail of the OPCode Command.

Constructor & Destructor Documentation

◆ Member()

SNFClient.OPCode.Member.Member ( Rank Rank,
byte Value,
string Definition )

Creates a new Member instance.

Use Appropriate Functions to add this into the OPCode structure or else it would be rendred useless

See Also

See also
AddCategory(Member), AddSubCategory(Member, Member), AddCommand(Member, Member, RequestCB), AddDetail(Member, Member)




Parameters
Rank
Value
Definition

Member Function Documentation

◆ getCategory()

static Member SNFClient.OPCode.Member.getCategory ( byte Category)
static

Gets an Instace of a Saved Category.

Parameters
CategoryThe Category to search for
Returns
member Instance if found else null
Exceptions
Exceptions.OPCode.InvalidRankFoundMember Found Contains an invalid Rank

◆ getSubCategory() [1/2]

static Member SNFClient.OPCode.Member.getSubCategory ( byte Category,
byte SubCategory )
static

Gets a Subcategory Member depending on a byte according to the byte of Category.

Parameters
CategoryThe Category to search in
SubCategoryThe Subategory to search for
Returns
member Instance if found else null
Exceptions
Exceptions.OPCode.InvalidRankFoundMember Found Contains an invalid Rank

◆ getSubCategory() [2/2]

static Member SNFClient.OPCode.Member.getSubCategory ( Member Category,
byte SubCategory )
static

Gets a Subcategory Member depending on a byte from a Category member.

Parameters
CategoryThe Category to search in
SubCategoryThe Subategory to search for
Returns
member Instance if found else null
Exceptions
Exceptions.OPCode.InvalidRankFoundMember Found Contains an invalid Rank

◆ getCommand() [1/2]

static Member SNFClient.OPCode.Member.getCommand ( byte Category,
byte SubCategory,
byte Command )
static

Gets a Command Member depending on a byte accoring to the bytes of Category and SubCategory.

Parameters
CategoryThe Category to search in
SubCategoryThe Subategory to search in
CommandThe Command to search for
Returns
member Instance if found else null
Exceptions
Exceptions.OPCode.InvalidRankFoundMember Found Contains an invalid Rank

◆ getCommand() [2/2]

static Member SNFClient.OPCode.Member.getCommand ( Member SubCategory,
byte Command )
static

Gets a Command Member depending on a byte from a Subcategory Member.

Parameters
SubCategoryThe Subategory to search in
CommandThe Command to search for
Returns
member Instance if found else null
Exceptions
Exceptions.OPCode.InvalidRankFoundMember Found Contains an invalid Rank

◆ getDetail() [1/2]

static Member SNFClient.OPCode.Member.getDetail ( byte Category,
byte SubCategory,
byte Command,
byte Detail )
static

Gets a Detail Member depending on a byte accoring to the bytes of Category, SubCategory and Command.

Parameters
CategoryThe Category to search in
SubCategoryThe Subategory to search in
CommandThe Command to search in
DetailThe Detail to search for
Returns
member Instance if found else the first instance, in otherwords a Detail with value of Base.DET_UNDETAILED
Exceptions
Exceptions.OPCode.InvalidRankFoundMember Found Contains an invalid Rank

◆ getDetail() [2/2]

static Member SNFClient.OPCode.Member.getDetail ( Member Command,
byte Detail )
static

Gets a Detail Member depending on a byte from a Command Member.

Parameters
CommandThe Command to search in
DetailThe Detail to search for
Returns
member Instance if found else the first instance, in otherwords a Detail with value of Base.DET_UNDETAILED
Exceptions
Exceptions.OPCode.InvalidRankFoundMember Found Contains an invalid Rank

◆ AddCategory() [1/2]

static bool SNFClient.OPCode.Member.AddCategory ( byte Category,
string Definition )
static

Adds a new Category into the OPCode structure.

Parameters
CategoryThe byte Defining the Category
DefinitionDefinition of the Category
Returns
true Category has been added
false Category already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized

◆ AddCategory() [2/2]

static bool SNFClient.OPCode.Member.AddCategory ( Member Category)
static

Adds a Category into the OPCode structure.

Parameters
CategoryThe Member Category you want to add
Returns
true Member has been added
false Member already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized
Exceptions.OPCode.InvalidRankFoundA Member contains an innapropriate Rank

◆ AddSubCategory() [1/2]

static bool SNFClient.OPCode.Member.AddSubCategory ( Member Category,
byte SubCategory,
string Definition )
static

Adds a new Subcategory into the OPCode Structure.

Parameters
CategoryThe Parent Category
SubCategoryThe byte difining the SubCategory
DefinitionThe Difinition fo the Subcategory
Returns
true Member has been added
false Member already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized
Exceptions.OPCode.InvalidRankFoundA Member contains an innapropriate Rank

◆ AddSubCategory() [2/2]

static bool SNFClient.OPCode.Member.AddSubCategory ( Member Category,
Member SubCategory )
static

Adds a Subcategory into the OPCode Structure.

Parameters
CategoryThe Parent Category
SubCategoryThe SubCategory Member to add
Returns
true Member has been added
false Member already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized
Exceptions.OPCode.InvalidRankFoundA Member contains an innapropriate Rank

◆ AddCommand() [1/2]

static bool SNFClient.OPCode.Member.AddCommand ( Member SubCategory,
byte Command,
string Definition,
RequestCB OnServerCall = null )
static

Adds a new Command into the OPCode structure.

Parameters
SubCategoryParent SubCategory
CommandThe byte defining the Command
DefinitionThe definition of the Command
OnServerCallDefines the Function to be called if the server has called this OPCode Commnd ( Default: null )
Returns
true Member has been added
false Member already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized
Exceptions.OPCode.InvalidRankFoundA Member contains an innapropriate Rank

◆ AddCommand() [2/2]

static bool SNFClient.OPCode.Member.AddCommand ( Member SubCategory,
Member Command,
RequestCB OnServerCall = null )
static

Adds a Command into the OPCode structure.

Parameters
SubCategoryParent SubCategory
CommandThe Command Member to add
OnServerCallDefines the Function to be called if the server has called this OPCode Commnd ( Default: null )
Returns
true Member has been added
false Member already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized
Exceptions.OPCode.InvalidRankFoundA Member contains an innapropriate Rank

◆ AddDetail() [1/2]

static bool SNFClient.OPCode.Member.AddDetail ( Member Command,
byte Detail,
string Definition )
static

Adds a new Detail into the OPCode structure.

Parameters
CommandParent Command
DetailThe byte defining the Detail
DefinitionThe definition of the Detail
Returns
true Member has been added
false Member already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized
Exceptions.OPCode.InvalidRankFoundA Member contains an innapropriate Rank

◆ AddDetail() [2/2]

static bool SNFClient.OPCode.Member.AddDetail ( Member Command,
Member Detail )
static

Adds a Detail into the OPCode structure.

Parameters
CommandParent Command
DetailThe Detail to add
Returns
true Member has been added
false Member already exists
Exceptions
Exceptions.ClassUninitializedOPCode.Base was not intialized
Exceptions.OPCode.InvalidRankFoundA Member contains an innapropriate Rank

◆ clone()

Member SNFClient.OPCode.Member.clone ( )

Clones the Member.

Returns
A Clone of the Member instance

◆ InvokeCommandCB()

void SNFClient.OPCode.Member.InvokeCommandCB ( Request Rqst)

Invoke the Command's Callback.

Parameters
Rqst

Property Documentation

◆ Categories

LinkedList<Member> SNFClient.OPCode.Member.Categories
staticget

Gets The Saved Categories ( Or the Structure of the Registred OPCodes )

◆ MemberRank

Rank SNFClient.OPCode.Member.MemberRank
get

Returns the Member's Rank.

◆ Value

byte SNFClient.OPCode.Member.Value
get

Returns The Member's Byte Value.

◆ Definition

string SNFClient.OPCode.Member.Definition
get

Returns The Member's Definition.

◆ Sub

LinkedList<Member> SNFClient.OPCode.Member.Sub
get

Returns The Member's Sub Members.

Note
Detail Members Should not have sub members

◆ CommandCB

RequestCB SNFClient.OPCode.Member.CommandCB
set

Sets the function to be called when the server Sends a Server Request.


The documentation for this class was generated from the following file: