TDAMacroExpression

Overview

The TDAMacroExpression class s a descendant of the TDAWhereExpression class and used to represent a call to a macro function.

Location

 

constructor Create  overload

Creates a new expression of the TDAMacroExpression class.

constructor Create

constructor Create (string)  overload

Creates a new expression of the TDAMacroExpression class and initializes its Name property.

constructor Create(const aName: string)

Parameters:

  • aName: Name of macro.

constructor Create (string, array of TDAWhereExpression)  overload

Creates a new expression of the TDAMacroExpression class and initializes its Name property. The method also intializes a list of macro parameters.

constructor Create(const aName: string; const aValues: array of TDAWhereExpression)

Parameters:

  • aName: Name of macro.
  • aValues: array of expressions.

Add

Adds the provided TDAWhereExpression instance to the list of macro parameter values.

procedure Add(aValue: TDAWhereExpression)

Parameters:

  • aValue: expression.

Count

Gets a count of the defined macro parameters.

property Count: Integer read

Delete

Deletes the TDAWhereExpression instance by the index from the macro parameter list.

procedure Delete(index: Integer)

Parameters:

  • index: position

DoValidate  protected    (declared in TDAWhereExpression)

Raised exception if aRaiseException is set

procedure DoValidate(aRaiseException: Boolean; aName: string)

Parameters:

  • aRaiseException: specifies should the exception be raised or not.
  • aName: Name of property

GetWhereKind  protected override

function GetWhereKind: TDAWhereKind

Insert

Inserts the provided TDAWhereExpression instance into the list of macro parameter values at the Position position.

procedure Insert(Position: Integer; aValue: TDAWhereExpression)

Parameters:

  • Position: position
  • aValue: expression.

Item

Gets or sets a macro parameter at the index position.

property Item[idx: Integer]: TDAWhereExpression read write

Kind    (declared in TDAWhereExpression)

property Kind: TDAWhereKind read

Name

Name of the macro expression.

property Name: string read write

ParseException  protected    (declared in TDAWhereExpression)

Raises EDAWhereParseXmlException.

procedure ParseException(aName: string)

Parameters:

  • aName: property name.

ParseExpression (IXmlNode, string): TDAWhereExpression  protected overload    (declared in TDAWhereExpression)

Calls ParseException if xr is nil, otherwise calls overload ParseException.

function ParseExpression(xr: IXmlNode; aName: string): TDAWhereExpression

Parameters:

  • xr: source node.
  • aName: Name of property

ParseExpression (IXmlNode): TDAWhereExpression  overload    (declared in TDAWhereExpression)

Creates new Where expression from XML node.

class function ParseExpression(xr: IXmlNode): TDAWhereExpression

Parameters:

  • xr: given XML node.

ReadFromXml  override

Reads where expression from the XML.

procedure ReadFromXml(xr: IXmlNode)

Parameters:

  • xr: source node

Remove

Removes the provided TDAWhereExpression instance from the macro parameters list.

procedure Remove(aValue: TDAWhereExpression)

Parameters:

  • aValue: expression.

RemoveEmptyNodes    (declared in TDAWhereExpression)

class procedure RemoveEmptyNodes(aNode: IXMLNode)

Parameters:

  • aNode:

Validate  override

Validates properties of expression.

procedure Validate

WriteToXml  override

Writes where expression to the XML.

procedure WriteToXml(sw: IXmlNode)

Parameters:

  • sw: destination node

 

Count

Gets a count of the defined macro parameters.

property Count: Integer read

Item

Gets or sets a macro parameter at the index position.

property Item[idx: Integer]: TDAWhereExpression read write

Kind    (declared in TDAWhereExpression)

property Kind: TDAWhereKind read

Name

Name of the macro expression.

property Name: string read write

 

ParseExpression (IXmlNode): TDAWhereExpression  overload    (declared in TDAWhereExpression)

Creates new Where expression from XML node.

class function ParseExpression(xr: IXmlNode): TDAWhereExpression

Parameters:

  • xr: given XML node.

RemoveEmptyNodes    (declared in TDAWhereExpression)

class procedure RemoveEmptyNodes(aNode: IXMLNode)

Parameters:

  • aNode:

 

constructor Create  overload

Creates a new expression of the TDAMacroExpression class.

constructor Create

constructor Create (string)  overload

Creates a new expression of the TDAMacroExpression class and initializes its Name property.

constructor Create(const aName: string)

Parameters:

  • aName: Name of macro.

constructor Create (string, array of TDAWhereExpression)  overload

Creates a new expression of the TDAMacroExpression class and initializes its Name property. The method also intializes a list of macro parameters.

constructor Create(const aName: string; const aValues: array of TDAWhereExpression)

Parameters:

  • aName: Name of macro.
  • aValues: array of expressions.

Add

Adds the provided TDAWhereExpression instance to the list of macro parameter values.

procedure Add(aValue: TDAWhereExpression)

Parameters:

  • aValue: expression.

Delete

Deletes the TDAWhereExpression instance by the index from the macro parameter list.

procedure Delete(index: Integer)

Parameters:

  • index: position

DoValidate  protected    (declared in TDAWhereExpression)

Raised exception if aRaiseException is set

procedure DoValidate(aRaiseException: Boolean; aName: string)

Parameters:

  • aRaiseException: specifies should the exception be raised or not.
  • aName: Name of property

GetWhereKind  protected override

function GetWhereKind: TDAWhereKind

Insert

Inserts the provided TDAWhereExpression instance into the list of macro parameter values at the Position position.

procedure Insert(Position: Integer; aValue: TDAWhereExpression)

Parameters:

  • Position: position
  • aValue: expression.

ParseException  protected    (declared in TDAWhereExpression)

Raises EDAWhereParseXmlException.

procedure ParseException(aName: string)

Parameters:

  • aName: property name.

ParseExpression (IXmlNode, string): TDAWhereExpression  protected overload    (declared in TDAWhereExpression)

Calls ParseException if xr is nil, otherwise calls overload ParseException.

function ParseExpression(xr: IXmlNode; aName: string): TDAWhereExpression

Parameters:

  • xr: source node.
  • aName: Name of property

ReadFromXml  override

Reads where expression from the XML.

procedure ReadFromXml(xr: IXmlNode)

Parameters:

  • xr: source node

Remove

Removes the provided TDAWhereExpression instance from the macro parameters list.

procedure Remove(aValue: TDAWhereExpression)

Parameters:

  • aValue: expression.

Validate  override

Validates properties of expression.

procedure Validate

WriteToXml  override

Writes where expression to the XML.

procedure WriteToXml(sw: IXmlNode)

Parameters:

  • sw: destination node