| Python Script Engine 8.3 GL Studio Editor Python Script API

Public Member Functions | List of all members
Method Class Reference

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

## Detailed Description

common editor interface method

## Constructor & Destructor Documentation

## ◆ Method() [1/2]

Method::Method | ( | String | name,
|  | String | type,
|  | String | args
| ) |  |

Creates a method with the given information set.

Parameters

  name | Name of new method
  type | Return type of new method
  args | Arguments for the new method

## ◆ Method() [2/2]

Method::Method | ( | String | name,
|  | String | type,
|  | String | args,
|  | String | comment,
|  | String | methodBody,
|  | int | protection = `0`
| ) |  |

Creates a method with the given initial values set.

Parameters

  name | Name of new method
  type | Return type of new method
  args | Arguments for the new method
  comment | String comment regarding the method
  methodBody | String to be used as the Method body
  protection | Int 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()

String Method::GetArguments | ( |  | ) |

Retrieves the method's arguments.

Returns
  String containing the arguments of the method

## ◆ GetComment()

String Method::GetComment | ( |  | ) |

Retrieves the comment associated with the method.

Returns
  String containing the comment

## ◆ GetMethodBodyStr()

String Method::GetMethodBodyStr | ( |  | ) |

Retrieves the method body for the method.

Returns
  String containing the method body

## ◆ GetMethodConst()

bool Method::GetMethodConst | ( |  | ) |

Indicates whether or not the method is *.

Since
  GL Studio 6.0.1

## ◆ GetName()

String Method::GetName | ( |  | ) |

Retrieves the method's name.

Returns
  String 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()

String Method::GetType | ( |  | ) |

Retrieves the method's return type.

Returns
  String 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()

String Method::GetUserDefinedAttributeValue | ( | String | attributeName | ) |

Gets a User Defined Attribute Value associated with the method.

Parameters

  attributeName | String containing the name of the attribute value to retrieve

Returns
  String containing the value of the attribute

## ◆ SetArguments()

void Method::SetArguments | ( | String | args | ) |

Sets the method's arguments.

Parameters

  args | New arguments for the method

## ◆ SetComment()

void Method::SetComment | ( | String | comment | ) |

Sets the comment associated with the method.

Parameters

  comment | String containing the comment for the method

## ◆ SetMethodBodyStr()

void Method::SetMethodBodyStr | ( | String | methodBodyStr | ) |

Sets the method body for the method.

Parameters

  methodBodyStr | String containing the method body

## ◆ SetMethodConst()

void Method::SetMethodConst | ( | bool | isConst | ) |

Sets whether or not the method is *.

Since
  GL Studio 6.0.1

## ◆ SetName()

void Method::SetName | ( | String | name | ) |

Sets the method's name.

Parameters

  name | New name of method

## ◆ SetProtection()

void Method::SetProtection | ( | int | protection | ) |

Sets the protection mode associated with the method.

Parameters

  protection | Int for protection type for method: 0 = Public, 1 = Private, 2 = Protected.

Since
  GL Studio 6.0.1

## ◆ SetShouldGenerateMethodBody()

void Method::SetShouldGenerateMethodBody | ( | bool | shouldGenerate | ) |

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

Parameters

  shouldGenerate | Bool specifying its generation state

Since
  GL Studio 6.0.1

## ◆ SetType()

void Method::SetType | ( | String | type | ) |

Sets the method's return type.

Parameters

  type | New return type for the method

## ◆ SetUserDefinedAttributeValue()

void Method::SetUserDefinedAttributeValue | ( | String | attributeName,
|  | String | value
| ) |  |

Sets a User Defined Attribute Value associated with the method.

Parameters

  attributeName | String containing the name of the attribute value to retrieve
  value | String containing the value to ba assigned to the attribute

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

- Method.i