LockingStatement
Overview
This class represents a locking statement. Locking creates a new variable and assigns the value passed to that local, then it calls System.Threading.Monitor.Enter on the value, the body goes into a try/finally block, and the compiler will add a System.Threading.Monitor.Leave on the value inside the finally.
Location
- Reference: RemObjects.Elements.Cirrus.dll
- Namespace: RemObjects.Elements.Cirrus.Statements
- Ancestry: Statement | LockingStatement
constructor
Constructor that does not initialize any fields.
constructor
LockingStatement()
init()
LockingStatement()
Sub New()
Initialize a locking statement
Parameters:
- aValue: value to lock on
- aBody: Body of this locking statement
- aName: name for the value to lock on (optional)
- aType: optional type for the locking statement
Body
Body of this locking statement
property Body: Statement read write;
Statement Body { get; set; }
var Body: Statement { get{} set{} }
Statement Body { __get; __set; }
Property Body() As Statement
BuildStatement
Converts a statement to a string.
method BuildStatement(anIndent: Int32; sb: StringBuilder)
void BuildStatement(Int32 anIndent, StringBuilder sb)
func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)
void BuildStatement(Int32 anIndent, StringBuilder sb)
Sub BuildStatement(anIndent As Int32, sb As StringBuilder)
Parameters:
- anIndent: The nr of spaces to place before the start of this statement.
- sb: Output string builder.
Kind
Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts
property Kind: StatementKind read;
StatementKind Kind { get; }
var Kind: StatementKind { get{} }
StatementKind Kind { __get; }
ReadOnly Property Kind() As StatementKind
Name
Optionally introduced local variable name
property Name: String read write;
String Name { get; set; }
var Name: String { get{} set{} }
String Name { __get; __set; }
Property Name() As String
OverflowCheck (declared in Statement)
Overflow checking for binary and unary operations in this statement
property OverflowCheck: Boolean read write;
Boolean OverflowCheck { get; set; }
var OverflowCheck: Boolean { get{} set{} }
Boolean OverflowCheck { __get; __set; }
Property OverflowCheck() As Boolean
Position (declared in Statement)
Position this statement is defined at
property Position: IPosition read write;
IPosition Position { get; set; }
var Position: IPosition { get{} set{} }
IPosition Position { __get; __set; }
Property Position() As IPosition
SetOverflowCheckRecursive
Recursively sets the OverflowCheck flag
method SetOverflowCheckRecursive(value: Boolean)
void SetOverflowCheckRecursive(Boolean value)
func SetOverflowCheckRecursive(_ value: Boolean)
void SetOverflowCheckRecursive(Boolean value)
Sub SetOverflowCheckRecursive(value As Boolean)
Parameters:
- value: new value
ToString (declared in Statement)
Returns this statement as a string
method ToString: String
String ToString()
func ToString() -> String
String ToString()
Function ToString() As String
ToValue
Converts this statement to a value tree that creates these statements
Parameters:
- aServicesParameter: the value that contains where aServices is stored
- aServices: Actual services instance.
Type
Type of the local introduced in this locking statement
property Type: IType read write;
IType Type { get; set; }
var Type: IType { get{} set{} }
IType Type { __get; __set; }
Property Type() As IType
Value
Value to lock on
Body
Body of this locking statement
property Body: Statement read write;
Statement Body { get; set; }
var Body: Statement { get{} set{} }
Statement Body { __get; __set; }
Property Body() As Statement
Kind
Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts
property Kind: StatementKind read;
StatementKind Kind { get; }
var Kind: StatementKind { get{} }
StatementKind Kind { __get; }
ReadOnly Property Kind() As StatementKind
Name
Optionally introduced local variable name
property Name: String read write;
String Name { get; set; }
var Name: String { get{} set{} }
String Name { __get; __set; }
Property Name() As String
OverflowCheck (declared in Statement)
Overflow checking for binary and unary operations in this statement
property OverflowCheck: Boolean read write;
Boolean OverflowCheck { get; set; }
var OverflowCheck: Boolean { get{} set{} }
Boolean OverflowCheck { __get; __set; }
Property OverflowCheck() As Boolean
Position (declared in Statement)
Position this statement is defined at
property Position: IPosition read write;
IPosition Position { get; set; }
var Position: IPosition { get{} set{} }
IPosition Position { __get; __set; }
Property Position() As IPosition
Type
Type of the local introduced in this locking statement
property Type: IType read write;
IType Type { get; set; }
var Type: IType { get{} set{} }
IType Type { __get; __set; }
Property Type() As IType
Value
Value to lock on
constructor
Constructor that does not initialize any fields.
constructor
LockingStatement()
init()
LockingStatement()
Sub New()
Initialize a locking statement
Parameters:
- aValue: value to lock on
- aBody: Body of this locking statement
- aName: name for the value to lock on (optional)
- aType: optional type for the locking statement
BuildStatement
Converts a statement to a string.
method BuildStatement(anIndent: Int32; sb: StringBuilder)
void BuildStatement(Int32 anIndent, StringBuilder sb)
func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)
void BuildStatement(Int32 anIndent, StringBuilder sb)
Sub BuildStatement(anIndent As Int32, sb As StringBuilder)
Parameters:
- anIndent: The nr of spaces to place before the start of this statement.
- sb: Output string builder.
SetOverflowCheckRecursive
Recursively sets the OverflowCheck flag
method SetOverflowCheckRecursive(value: Boolean)
void SetOverflowCheckRecursive(Boolean value)
func SetOverflowCheckRecursive(_ value: Boolean)
void SetOverflowCheckRecursive(Boolean value)
Sub SetOverflowCheckRecursive(value As Boolean)
Parameters:
- value: new value
ToString (declared in Statement)
Returns this statement as a string
method ToString: String
String ToString()
func ToString() -> String
String ToString()
Function ToString() As String
ToValue
Converts this statement to a value tree that creates these statements
Parameters:
- aServicesParameter: the value that contains where aServices is stored
- aServices: Actual services instance.