Classes
AdjustColumnName
AdjustColumnName(String
pColumnName, Long pTagCase)
AdjustColumnName(StringTheory pColumnName,
Long pTagCase)
Description
A worker method. This method takes in a name, possibly containing a
prefix, and returns the name without the prefix. The case of the name
may also be changed, based on the contents of the pTagCase parameter.
Parameters
Parameter |
Description |
pColumnName |
A string containing a field name. If the fieldname contains
a pipe character (|) then that character, and everything after
that character are removed |
pTagCase |
One of rf:CaseUpper, rf:CaseLower or rf:CaseAsIs. |
Return Value
The adjusted name. If the StringTheory form of the procedure is called
then nothing is returned, but the pColumnName parameter is changed.
Example
reflection.AdjustColumnName(str,rf:CaseLower)
See Also
Classes
AssignStringPtr
AssignStringPtr(*?
pField,String pValue)
AssignCStringPtr(*? pField,String
pValue)
AssignPStringPtr(*? pField,String
pValue)
AssignStringtheoryPtr(*?
pField,String pValue)
AssignStringPtr(*?
pField,StringTheory pValue)
AssignCStringPtr(*? pField,StringTheory pValue)
AssignPStringPtr(*? pField,StringTheory pValue)
AssignStringtheoryPtr(*? pField,StringTheory pValue)
Description
Helper functions. These assist with assigning a value to a field in a
structure, where that field is a pointer to a string or stringtheory
type.
Typically the first parameter is an ANY field, which is set using a
call to WHAT, and you want to assign something into that field.
Parameters
Parameter |
Description |
pField |
An ANY reference to the field to be set. This field is of
the appropriate pointer type (as specified in the method
name).
If the field is currently NULL, then a new value will be
created. |
pValue |
The value to assign into the field. |
Return Value
Nothing
Example
See Also
ReadStringPtr / ReadCStringPtr /
ReadPStringPtr / ReadStringTheoryPtr
Classes
CleanFieldName
CleanFieldName(*StringTheory
pFieldName)
Description
Takes in a StringTheory object containing an Extended Name , and
removes everything from the first pipe onwards. If the name contains a
prefix (designated by a :) then it is removed.
Parameters
Parameter |
Description |
pFieldName |
The extended name of a field, as might be returned by the
WHO command. |
Return Value
Nothing. The passed StringTheory object is adjusted to contain the
clean field name, without the attributes or prefix.
Example
reflection.CleanFieldName(str)
See Also
GetField,
GetFieldName,
GetFieldNumber,
GetFieldValue
Classes
ClearAttribute
ClearAttribute(*Cstring
pGroupName, String pAttribute)
Description
Deletes an attribute from all fields in the group.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pAttribute |
The name of the attribute to delete. |
Return Value
Nothing
Example
reflection.ClearAttribute(GroupName,'private')
See Also
SetAttribute,
GetAttributeExists,
GetAttributeValue,
DeleteAttribute,
SetAttributes ,
ClearAttribute
.
Classes
ClearGroup
ClearGroup(*Cstring
pGroupName, *Group pGroup)
ClearGroup(*Group pGroup)
Description
Clears all the fields in a group structure. Pointer fields are NOT
cleared. StringTheory Objects are FREE'd. Queue References are FREE'd.
Pointers to strings are set back to blank strings. This method can
only be used after the Group structure has been parsed.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pGroup |
The group structure.
|
Return Value
Nothing
Example
reflection.ClearGroup(GroupName,TaxGroup)
See Also
DisposeGroup,
DisposeQueue,
ClearGroup,
ClearQueue,
ClearTable,
Parse .
Classes
ClearQueue
ClearQueue(*Cstring
pGroupName, *Queue pQueue)
ClearQueue(*Queue pQueue)
Description
Clears all the fields in a queue structure.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pQueue |
The Queue structure
|
Return Value
Nothing
Example
reflection.ClearQueue(GroupName,PetsQueue)
See Also
DisposeGroup,
DisposeQueue,
ClearGroup,
ClearQueue,
ClearTable,
Parse .
Classes
ClearTable
ClearTable(*Cstring
pGroupName, *FILE pTable)
Description
Clears the record buffer for the table. If the table is OPEN then any
MEMO and BLOB fields are cleared as well.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pTable |
The table to be cleared.
|
Return Value
Nothing
Example
reflection.ClearTable(GrouName,Customers)
See Also
DisposeGroup,
DisposeQueue,
ClearGroup,
ClearQueue,
ClearTable,
Parse .
Classes
CountFieldsInGroup
CountFieldsInGroup(*Group
pGroup)
Description
Counts the number of fields inside a GROUP structure.
Parameters
Parameter |
Description |
pGroup |
The group to count the fields in. |
Return Value
Long. The number of fields in a group
Example
ax = reflection.CountFieldsInGroup(Cus:Record)
See Also
Classes
DeleteAttribute
DeleteAttribute(*Cstring
pGroupName,*Cstring pColumnName, String pAttribute)
Description
Deletes an attribute from a field.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
pAttribute |
The name of the attribute to delete. |
Return Value
Nothing
Example
reflection.DeleteAttribute(GroupName,ColumnName,'binary')
reflection.DeleteAttribute(GroupName,ColumnName,'rename')
See Also
SetAttribute,
GetAttributeExists,
GetAttributeValue,
DeleteAttribute,
SetAttributes ,
ClearAttribute
.
Classes
DisposeGroup
DisposeGroup(*Group
pGroup,Long pDispose=false)
Description
Checks a group for any string pointer, stringtheory, queue fields and
follows any queue references, freeing memory as needed.
Parameters
Parameter |
Description |
pGroup |
The group to check. |
pDispose |
Set to true if the passed in Group should be disposed as
well. False by default. |
Return Value
Nothing
Example
reflection.DisposeGroup(PetsGroup)
See Also
DisposeGroup,
DisposeQueue,
ClearGroup,
ClearQueue,
ClearTable .
Classes
DisposeQueue
DisposeQueue(*Queue
pQueue,Long pDispose=false)
Description
Checks a queue for any string pointer, StringTheory, queue fields and
follows any queue references, freeing memory as needed. The Queue is
FREE'd and (optionally) disposed as well.
Parameters
Parameter |
Description |
pQueue |
The queue to dispose |
pDispose |
Set to true if the passed in queue should be disposed as
well. False by default. |
Return Value
Nothing
Example
reflection.DisposeQueue(PetsQueue)
See Also
DisposeGroup,
DisposeQueue,
ClearGroup,
ClearQueue,
ClearTable .
Classes
FixCreate
FixCreate(*File
pTable)
Description
Removes any ExternalNameAttributes from the prop:name of each field in
a table. This should be called before calling the CREATE statement on
a table. This only affects the prop:name of each field, not the WHO of
the field, so parsing the structure is unaffected by this call.
Only the table structure on this thread is altered - the table
structure on other threads is not altered.
Parameters
Parameter |
Description |
pTable |
the table to adjust, before calling Create. |
Return Value
Nothing
Example
reflection.FixCreate(Customers)
See Also
Classes
GetAnySize
GetAnySize(*?
pField )
Description
Uses the (undocumented) TUFO interface to get the size of a field.
Parameters
Parameter |
Description |
pField |
Any field |
Return Value
The SIZE of the field.
Example
l = reflection.GetAnySize(someString)
See Also
GetAnyType
Classes
GetAnyType
GetAnyType(*?
pField )
Description
Uses the (undocumented) TUFO interface to get the type of a field.
Parameters
Parameter |
Description |
pField |
Any field |
Return Value
The rf:whatever type equate for the field.
Example
t = reflection.GetAnyType(someField)
See Also
GetAnySize .
Classes
GetArray
GetArray(*Cstring
pGroupName,*Cstring pColumnName)
Description
Returns the number of array elements in the field. Default is 1 for
fields which are not arrays.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
Return Value
The method returns a LONG containing the number of array elements.
Example
If reflection.GetArray(groupname,columnname) >
1
! field is an array
End
See Also
GetField,
GetFieldValue
,
GetArray.
Classes
GetAttributeExists
GetAttributeExists(*Cstring
pGroupName,*Cstring pColumnName, String pAttribute)
GetAttributeExists(String pAttribute)
Description
Checks to see if an attribute exists for the column. Use the short
form only when the queues are already loaded with
With.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
pAttribute |
The name of the attribute to get. |
Return Value
The method returns
rf:ok if the attribute
exists or
rf:notok if it does not exist.
Example
If
reflection.GetAttributeExists(groupname,columnname,'binary') = rf:ok
! do something
End
See Also
SetAttribute,
GetAttributeValue,
DeleteAttribute,
SetAttributes
.
Classes
GetAttributeValue
GetAttributeValue(*Cstring
pGroupName,*Cstring pColumnName, String pAttribute)
Description
Adds
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
pAttribute |
The name of the attribute to get. |
Return Value
If the attribute is a simple one then the method returns
rf:ok
if the attribute exists or
rf:notok if it
does not exist. If the attribute is of the form attribute(value) then
the value is returned as a string.
Example
If
reflection.GetAttribute(groupname,columnname,'binary') = rf:ok
! do something
End
See Also
SetAttribute,
GetAttributeExists,
DeleteAttribute,
SetAttributes
.
Classes
GetColumnName [1]
GetColumnName(*Group
pGroup,Long pIndex)
GetColumnName(*Queue pQueue,Long
pIndex)
GetColumnName(*Table pTable,Long
pIndex)
Description
Gets the column name for a field at a specific place in the structure.
Useful for all the methods that take a group name, and a column name.
Parameters
Parameter |
Description |
pGroup
pQueue
pTable |
The structure to reflect. |
pIndex |
The number of the field inside that structure. (This is not
necessarily the same number returned by GetNumber) |
Return Value
A string containing the column name of that field.
Example
columnName =
reflection.GetColumnName(Customers,3)
See Also
GetColumnName [2] .
Classes
GetColumnName [2]
GetColumnName(*Cstring
pGroupName,*Cstring pTagName)
Description
Returns the ColumnName of the structure, based on the Rename attribute
(which matches the tagname in the external structure, xml, json, etc.)
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pTagName |
The external tagname, as specified in the rename() or
specific rename attribute. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
Return Value
The column name of the field. This name can then be used in all the
other methods that take a group name and a column name.
Example
See Also
GetColumnName [1] .
Classes
GetDescription
GetDescription(*Cstring
pGroupName,*Cstring pColumnName)
Description
Gets the description value for a field.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
Return Value
The contents of the field's description, as set by an earlier call to
SetDescription.
Example
See Also
GetField,
GetFieldName,
GetFieldNumber,
GetFieldValue
,
SetDescription .
Classes
GetField
GetField(Group
pGroup,String pColumnName, <Long pIndex>)
Description
A utility method for making it easier to write code against generic
structures. Returns an ANY variable which points to the specific field
as named. Does not reference the parsed group list, so can be called
without parsing.
Parameters
Parameter |
Description |
pGroup |
A Group, or Queue structure. |
pColumnName |
The name of the column. |
pIndex |
If the field is an array then specifies which element in the
array to get. If omitted the default value is 1. If the pIndex
is larger than the items in the array then a null is returned. |
Return Value
An ANY Long containing a pointer to the field. May be NULL.
Example
a ANY
code
a &= reflection.GetField(color,'green')
See Also
GetField,
GetFieldName,
GetFieldNumber,
GetFieldValue
,
GetArray.
Classes
GetFieldName
GetFieldName(Group
pGroup,Long pFieldNumber, Long pCase=self.TagCase)
Description
A utility method for making it easier to write code against generic
structures. Returns the clean name of the field. This is the name
before the first pipe symbol, and with the prefix removed. The case is
adjusted using the pCase parameter. Does not reference the parsed
group list, so can be called without parsing.
Parameters
Parameter |
Description |
pGroup |
A Group, or Queue structure. |
pFieldNumber |
The number of the field inside the group. |
pCase |
One of rf:CaseAsIs, rf:CaseUpper,
rf:CaseLower, rf:CaseAny.
If omitted then the current value in the TagCase property is
used. |
Return Value
A String containing the clean name.
Example
See Also
GetField,
GetFieldName,
GetFieldNumber,
GetFieldValue
,
SetTagCase,
CleanFieldName
Classes
GetFieldNumber
GetFieldNumber(Group
pGroup,String pColumnName)
Description
A utility method for making it easier to write code against generic
structures. Returns a LONG variable which points to the specific field
as named. Does not reference the parsed group list, so can be called
without parsing.
Parameters
Parameter |
Description |
pGroup |
A Group, or Queue structure. |
pColumnName |
The name of the column.This parameter is case insensitive. |
Return Value
A Long containing the number of the field inside the group.
Example
See Also
GetField,
GetFieldName,
GetFieldNumber,
GetFieldValue
.
Classes
GetFieldValue
GetFieldValue(Group
pGroup,String pColumnName, <Long pIndex>)
Description
A utility method for making it easier to write code against generic
structures. Returns a clipped string containing the value of the field
in the group. Does not reference the parsed group list, so can be
called without parsing.
Parameters
Parameter |
Description |
pGroup |
A Group, or Queue structure. |
pColumnName |
The name of the column. |
pIndex |
If the field is an array then specifies which element in the
array to get. If omitted the default value is 1. If the pIndex
is larger than the items in the array then a blank string is
returned. |
Return Value
An ANY Long containing a pointer to the field. May be NULL.
Example
See Also
GetField,
GetFieldName,
GetFieldNumber,
GetFieldValue
,
GetArray .
Classes
GetNumber
GetNumber(*Cstring
pGroupName,*Cstring pColumnName)
Description
Returns the FieldNumber for a column. This is nominally the location
of the field in the structure (although technically it could be any
number.) This works on the FieldsQueue, so relies on the structure
already being
PARSEd.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
Return Value
A Long containing the field number.
Example
x = relection.GetNumber(GroupName,ColumnName)
See Also
GetNumber,
SetNumber,
GetColumnName,
Parse
Classes
GetPicture
GetPicture(*Cstring
pGroupName,*Cstring pColumnName)
Description
Gets the picture attribute for a column.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
Return Value
A string containing the picture attribute for the field. If no picture
attribute is set, then a blank string is returned.
Example
pic = reflection.GetPicture(GroupName,ColumnName)
See Also
GetPicture,
GetRename,
GetType,
SetPicture,
SetRename,
SetType
.
Classes
GetRename
GetRename(*Cstring
pGroupName,*Cstring pColumnName)
Description
Returns the Rename attribute for a field. If the
Tag
property is set when the structure is parsed, then this returns the
contents of the tag property. If that is not set then it returns the
rename property.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
Return Value
A string containing the <tag> attribute or the rename attribute.
Example
s = reflection.GetRename(groupname,columnname)
See Also
GetPicture,
GetRename,
GetType,
SetPicture,
SetRename,
SetType,
The Naming of Things .
Classes
GetTagCase
GetTagCase()
Description
Gets the value of the TagCase property. The default value for the
property is
rf:CaseAsIs
Return Value
A BYTE equate. One of
rf:CaseAsIs,
rf:CaseUpper,
rf:CaseLower,
rf:CaseAny.
Example
x = reflection.GetTagCase()
See Also
SetTagCase
Classes
GetType
GetType(*Cstring
pGroupName,*Cstring pColumnName)
Description
Gets the field type (as set in the extended attributes).
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the column. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
Return Value
A LONG equate. See
Supported Field
Types.
Example
x = reflection.GetType(GroupName,ColumnName)
See Also
GetPicture,
GetRename,
GetType,
SetPicture,
SetRename,
SetType,
Supported Field Types .
Classes
Parse
Parse(String
pGroupName, *Group pGroup)
Parse(*Group pGroup)
Parse(String pGroupName,*Queue pQueue)
Parse(*Queue
pQueue)
Parse(String pGroupName,*File pTable)
Parse(*File pTable)
Parse(String pGroupName,*View pView)
Parse(*View pView)
Description
Parses a structure.
Parameters
Parameter |
Description |
pGroupName |
A string name which identifies the structure. This will be
used when querying the object. If this parameter is omitted
then the name will be set to group, queue, file, and view
respectively. |
pGroup, pQueue, pTable, pView |
The Structure which will be parsed. |
Notes
This parses all the extended attributes for the structure.
Additional attributes, or changing an attribute, can be done after
calling Parse by using one of the SET methods.
The values of one or more attributes can be obtained using the GET
methods.
Return Value
Nothing
Example
reflection.parse('customers',CustomersTable)
See Also
Classes
ParseField
ParseField(*Cstring
pGroupName,StringTheory pExternalName)
Description
Takes in a single field, and a set of attributes. Parses them as-if
the field was in a group, and the attributes were attached to the
field. Useful for dealing with stand-alone fields.
Parameters
Parameter |
Description |
pGroupName |
A collective name for the single fields. |
pExternalName |
A pipe-delimited string containing the attributes for the
field. |
Return Value
A String containing the column name. (The Column name being extracted
from the pExternalName.)
Example
tag = reflection.ParseField('singles','Date |
@d6')
See Also
.
Classes
ReadStringPtr
ReadStringPtr(*?
pField)
ReadCStringPtr(*? pField)
ReadPStringPtr(*? pField)
ReadStringTheoryPtr(*? pField)
Description
Helper functions. These assist with reading the value in a field in a
structure, where that field is a pointer to a string or stringtheory
type.
Typically the first parameter is an ANY field, which is set using a
call to WHAT, and you want to assign something into that field.
Parameters
Parameter |
Description |
pField |
An ANY reference to the field to be read. This field is of
the appropriate pointer type (as specified in the method
name). If the pointer is null, then a blank string is
returned. |
Return Value
A string containing the value.
Example
See Also
AssignStringPtr / AssignCStringPtr /
AssignPStringPtr / AssignStringTheoryPtr ,
ReadStringPtr
/ ReadCStringPtr / ReadPStringPtr / ReadStringTheoryPtr .
Classes
ReadStringPtrLength
ReadStringPtrLength(*?
pField)
ReadCStringPtrLength(*? pField)
ReadPStringPtrLength(*? pField)
ReadStringTheoryPtrLength(*? pField)
Description
Helper functions. These assist with reading the length of a field in a
structure, where that field is a pointer to a string or stringtheory
type.
Typically the first parameter is an ANY field, which is set using a
call to WHAT, and you want to assign something into that field.
Parameters
Parameter |
Description |
pField |
An ANY reference to the field to be read. This field is of
the appropriate pointer type (as specified in the method
name). If the pointer is null, then a length of 0 is returned. |
Return Value
A long containing the length of the string (in bytes, not characters).
Example
See Also
AssignStringPtr / AssignCStringPtr /
AssignPStringPtr / AssignStringTheoryPtr,
ReadStringPtr
/ ReadCStringPtr / ReadPStringPtr /ReadStringTheoryPtr .
Classes
SetAttributes
SetAttributes(*Cstring
pGroupName,*Cstring pColumnName, StringTheory pExternalName)
SetAttributes(String
pGroupName,String pColumnName, String pExternalName)
Description
Takes a pipe-separated string (as returned by the WHO command) and
parses out all the attributes in the string, setting them for the
column.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. |
pColumnName |
The name of the field. |
pExternalName |
A pipe-delimited string of attributes - as might be returned
by the WHO command, or as might be set in the program code. |
Return Value
Nothing
Example
str.SetValue('somename | @D6')
reflection.SetAttributes(GroupName,ColumnName,str)
See Also
SetAttribute,
GetAttributeExists,
GetAttributeValue,
DeleteAttribute,
SetAttributes .
Classes
SetAttribute
SetAttribute(*Cstring
pGroupName,*Cstring pColumnName, String pAttribute)
SetAttribute(String pGroupName,String
pColumnName, String pAttribute)
Description
Sets an attribute for a column. Using this method directly allows
attributes to be added for fields in structures, where they can't be
added to the structure directly as an extended name attribute. It also
allows for an extended name attribute to be overridden.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. |
pColumnName |
The name of the field. |
pAttribute |
The name of the attribute. If the attribute is of the form
attribute(value) then include the value, and brackets, in this
parameter. |
Return Value
Nothing
Example
reflection.setAttribute(GroupName,ColumnName,'binary')
reflection.setAttribute(GroupName,ColumnName,'xmlname(paid)')
See Also
SetAttribute,
GetAttributeExists,
GetAttributeValue,
DeleteAttribute,
SetAttributes .
Classes
SetDescription
SetDescription(*Cstring
pGroupName,*Cstring pColumnName, String pDescription)
SetDescription(String
pGroupName,String pColumnName, String pDescription)
Description
Sets the description for a specific column.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. |
pColumnName |
The name of the field. |
pDescription |
A description to use for the column. |
Return Value
Nothing
Example
reflection.SetPicture(GroupName,ColumnName,'@d6')
See Also
GetPicture,
GetRename,
GetType,
SetPicture,
SetRename,
SetType
,
GetDescription.
Classes
SetNumber
SetNumber(*Cstring
pGroupName,*Cstring pColumnName, Long pColumnNumber)
Description
Sets the number for a specific column. This is usually the position of
the field in the structure, but this method could be used to override
that number. However this is not recommended.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the field. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
pColumnNumber |
A number to use for the column. |
Return Value
Nothing
Example
reflection.SetNumber(GroupName,ColumnName,14)
See Also
GetNumber,
SetNumber
.
Classes
SetPicture
SetPicture(*Cstring
pGroupName,*Cstring pColumnName, String pPicture)
SetPicture(String pGroupName,String
pColumnName, String pPicture)
Description
Sets the picture for a specific column.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. |
pColumnName |
The name of the field. |
pPicture |
A format picture to use for the column. |
Return Value
Nothing
Example
reflection.SetPicture(GroupName,ColumnName,'@d6')
See Also
GetPicture,
GetRename,
GetType,
SetPicture,
SetRename,
SetType
.
Classes
SetRename
SetRename(*Cstring
pGroupName,*Cstring pColumnName, String pRename)
Description
Sets the Rename attribute for a specific column.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the field. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
pRename |
The value to use for the Rename attribute of the field. |
Return Value
Nothing
Example
reflection.SetRename(GroupName,ColumnName,'happy')
See Also
GetPicture,
GetRename,
GetType,
SetPicture,
SetRename,
SetType
.
Classes
SetTagCase
SetTagCase(Byte
pCase)
Description
Sets the TagCase for the object.
Parameters
Parameter |
Description |
pCase |
One of rf:CaseAsIs, rf:CaseUpper,
rf:CaseLower, rf:CaseAny.
The default value is rf:CaseAsIs. |
Return Value
Nothing
Example
reflection.SetTagCase(rf:CaseLower)
See Also
GetTagCase.
Classes
SetType
SetType(*Cstring
pGroupName,*Cstring pColumnName, Long pFieldType)
SetType(String pGroupName,String
pColumnName, Long pFieldType)
Description
Sets the specific Type attribute for a column.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the field. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
pFieldType |
An equate, taken from the list of Supported
Field Types which best describes the field. |
Return Value
Nothing
Example
reflection.SetType(GroupName,ColumnName,rf:stringtheory)
See Also
GetPicture,
GetRename,
GetType,
SetPicture,
SetRename,
SetType,
Supported Field Types .
Classes
Start
Start()
Description
Returns the object to a virgin state, as if it has never been used.
Return Value
Nothing
Example
reflection.start()
See Also
Classes
TableFieldToColumn
TableFieldToColumn(FILE
pTable,String pLabel )
Description
Given a table label (including prefix), returns the Column name for
that field.
Parameters
Parameter |
Description |
pTable |
The Table |
pLabel |
The label of a field in the table (including prefix) |
Return Value
String containing the column name (as set by the external name.) If
not set then the label, (possibly minus the prefix, if RemovePrefix is
set, and adjusted to the TagCase) is returned.
Example
Column =
reflection.TableFieldToColumn(Customers,'cus:Name') ! returns say,
Name
See Also
.
Classes
Trace
Trace(string
pStr)
Description
Sends a string to the Windows Debug Output, where it can be monitored
using
Debugview. Useful when debugging the class.
Parameters
Parameter |
Description |
pStr |
The String to send to Debugview. The string will be
prepended with the identifier [guts]
|
Return Value
None
Example
Self.Trace('Hello World')
See Also
Walk .
Classes
Walk
Walk()
Description
A debugging method which sends the contents of the GroupsQueue and
FieldsQueue properties to debugview. This can be helpful in
understanding what the parser discovered when it parsed a structure,
and will also help to identify specific group names and column names.
Return Value
Nothing. Output is to Debugview.
Example
reflection.walk()
See Also
Trace
Classes
With
With(*Cstring
pGroupName,*Cstring pColumnName, Long pCreate=true)
With(*Cstring pGroupName)
Description
Long form fetches a row from the FieldsQueue property, which matches
the GroupName and ColumnName. (Does not load the GroupsQueue
property.)
Short form fetches a row from the GroupsQueue property which matches
the GroupName.
Parameters
Parameter |
Description |
pGroupName |
The GroupName parameter as previously passed to the Parse
procedure. This has to be set in a CSTRING variable, and
passed as a CSTRING variable. |
pColumnName |
The name of the field. This has to be set in a CSTRING
variable, and passed as a CSTRING variable. |
pCreate |
If the record is not found, and this field is set to true
(the default) then the row is added to the FieldsQueue. |
Return Value
rf:ok if the row is found,
rf:notok
if it is not.
Example
reflection.With(GroupName,ColumnName)
See Also