Python Script Engine  8.3
GL Studio Editor Python Script API
Method Class Reference

Public Member Functions

 Method (str name, str type, str args)
 
 Method (str name, str type, str args, str comment, str methodBody, int protection=0)
 
str GetName ()
 
None SetName (str name)
 
str GetType ()
 
None SetType (str type)
 
str GetArguments ()
 
None SetArguments (str args)
 
str GetComment ()
 
None SetComment (str comment)
 
int GetProtection ()
 
None SetProtection (int protection)
 
str GetMethodBodyStr ()
 
None SetMethodBodyStr (str methodBodyStr)
 
bool GetMethodConst ()
 
None SetMethodConst (bool isConst)
 
bool GetShouldGenerateMethodBody ()
 
None SetShouldGenerateMethodBody (bool shouldGenerate)
 
str GetUserDefinedAttributeValue (str attributeName)
 
None SetUserDefinedAttributeValue (str attributeName, str value)
 
UserDefinedValueAttributeList GetUserDefinedAttributes ()
 

Detailed Description

common editor interface method

Constructor & Destructor Documentation

◆ Method() [1/2]

Method::Method ( str  name,
str  type,
str  args 
)

Creates a method with the given information set.

Parameters
nameName of new method
typeReturn type of new method
argsArguments for the new method

◆ Method() [2/2]

Method::Method ( str  name,
str  type,
str  args,
str  comment,
str  methodBody,
int  protection = 0 
)

Creates a method with the given initial values set.

Parameters
nameName of new method
typeReturn type of new method
argsArguments for the new method
commentstr comment regarding the method
methodBodystr to be used as the Method body
protectionInt for protection type for method: 0 = Public, 1 = Private, 2 = Protected.
Since
protection param added in GL Studio 6.0.1

Member Function Documentation

◆ GetArguments()

str Method::GetArguments ( )

Retrieves the method's arguments.

Returns
str containing the arguments of the method

◆ GetComment()

str Method::GetComment ( )

Retrieves the comment associated with the method.

Returns
str containing the comment

◆ GetMethodBodyStr()

str Method::GetMethodBodyStr ( )

Retrieves the method body for the method.

Returns
str containing the method body

◆ GetMethodConst()

bool Method::GetMethodConst ( )

Indicates whether or not the method is *.

Since
GL Studio 6.0.1

◆ GetName()

str Method::GetName ( )

Retrieves the method's name.

Returns
str containing the name of the method

◆ GetProtection()

int Method::GetProtection ( )

Retrieves the protection mode associated with the method.

Returns
Int containing the protection mode
Since
GL Studio 6.0.1

◆ GetShouldGenerateMethodBody()

bool Method::GetShouldGenerateMethodBody ( )

Retrieves whether the method body should be generated for the method.

Returns
Bool specifying its generation state
Since
GL Studio 6.0.1

◆ GetType()

str Method::GetType ( )

Retrieves the method's return type.

Returns
str containing the return type of the method

◆ GetUserDefinedAttributes()

UserDefinedValueAttributeList Method::GetUserDefinedAttributes ( )

Retrieves the user defined value attributes from the method.

Returns
UserDefinedValueAttributeList containing the user defined attributes

◆ GetUserDefinedAttributeValue()

str Method::GetUserDefinedAttributeValue ( str  attributeName)

Gets a User Defined Attribute Value associated with the method.

Parameters
attributeNamestr containing the name of the attribute value to retrieve
Returns
str containing the value of the attribute

◆ SetArguments()

None Method::SetArguments ( str  args)

Sets the method's arguments.

Parameters
argsNew arguments for the method

◆ SetComment()

None Method::SetComment ( str  comment)

Sets the comment associated with the method.

Parameters
commentstr containing the comment for the method

◆ SetMethodBodyStr()

None Method::SetMethodBodyStr ( str  methodBodyStr)

Sets the method body for the method.

Parameters
methodBodyStrstr containing the method body

◆ SetMethodConst()

None Method::SetMethodConst ( bool  isConst)

Sets whether or not the method is *.

Since
GL Studio 6.0.1

◆ SetName()

None Method::SetName ( str  name)

Sets the method's name.

Parameters
nameNew name of method

◆ SetProtection()

None Method::SetProtection ( int  protection)

Sets the protection mode associated with the method.

Parameters
protectionInt for protection type for method: 0 = Public, 1 = Private, 2 = Protected.
Since
GL Studio 6.0.1

◆ SetShouldGenerateMethodBody()

None Method::SetShouldGenerateMethodBody ( bool  shouldGenerate)

Sets whether the method body should be generated for the method.

Parameters
shouldGenerateBool specifying its generation state
Since
GL Studio 6.0.1

◆ SetType()

None Method::SetType ( str  type)

Sets the method's return type.

Parameters
typeNew return type for the method

◆ SetUserDefinedAttributeValue()

None Method::SetUserDefinedAttributeValue ( str  attributeName,
str  value 
)

Sets a User Defined Attribute Value associated with the method.

Parameters
attributeNamestr containing the name of the attribute value to retrieve
valuestr containing the value to ba assigned to the attribute

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