Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl Class Referenceabstract

Base implementation of IMRecord. More...

Inheritance diagram for PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl:
PushTechnology.DiffusionCore.Messaging.Data.metadata.MNodeImpl PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord PushTechnology.DiffusionCore.Messaging.Data.metadata.IMNode PushTechnology.DiffusionCore.Messaging.Data.metadata.IMNode PushTechnology.DiffusionCore.Messaging.Data.metadata.MMessageImpl PushTechnology.DiffusionCore.Messaging.Data.metadata.record.MRecordRecord PushTechnology.DiffusionCore.Messaging.Data.metadata.record.MRecordMessage

Public Member Functions

override string ToString ()
 Returns this object as a human-readable string. More...
 
IMRecord AddRecord (string name)
 Adds a new child record with default multiplicity. More...
 
IMRecord AddRecord (string name, Multiplicity multiplicity)
 Adds a new child record. More...
 
IMField AddField (string name)
 Adds a new child field with default multiplicity and data type. More...
 
IMField AddField (string name, Multiplicity multiplicity)
 Adds a new child field with default data type. More...
 
IMField AddField (string name, MDataType dataType)
 Adds a new child field with default multiplicity. More...
 
IMField AddField (string name, MDataType dataType, Multiplicity multiplicity)
 Adds a new child field. More...
 
IMField AddCustomField (string name, Multiplicity multiplicity, ICustomFieldHandler handler)
 Adds a new child field with custom data type. More...
 
IMField AddCustomField (string name, Multiplicity multiplicity, string handler)
 Adds a new child field with custom data type. More...
 
IMRecord GetRecord (string name)
 Gets a child record by name. More...
 
IMField GetField (string name)
 Gets a child field by name. More...
 
IMNode GetChild (int index)
 Gets the child at a given index. More...
 
int GetChildIndex (string name)
 Get the index of the named child. More...
 
MNodeImpl LastChild ()
 Return the last child of this record, or null if no children. More...
 
MNodeImpl ChildBefore (MNodeImpl child)
 Return the child before the specified child, or null if none. More...
 
MNodeImpl ChildAfter (MNodeImpl child)
 Return the child after the specified child, or null if none. More...
 

Protected Member Functions

 MRecordImpl (string name, MRecordImpl parent, Multiplicity multiplicity)
 Constructor. More...
 
abstract void CheckAddRecord (string name, Multiplicity multiplicity)
 Check that a specified record can be added. More...
 
abstract MRecordImpl CreateRecord (string name, Multiplicity multiplicity)
 Child a child record. More...
 
abstract void CheckAddField (string name, MDataType dataType, Multiplicity multiplicity)
 Check that a specified field can be added. More...
 
abstract MFieldImpl CreateField (string name, MDataType dataType, Multiplicity multiplicity)
 Create a field. More...
 

Properties

abstract Multiplicity DefaultChildMultiplicity [get]
 Returns the implementation specific default multiplicity. More...
 
MDataType DefaultDataType [get]
 
override bool IsRecord [get, set]
 Indicates whether the node is a record. Returns true if the node is a record (an instance of IMRecord). Note that a message (instance of IMMessage) is considered to be a record. More...
 
override bool IsField [get, set]
 Indicates whether the node is a field. Returns true if the node is a field (an instance of IMField). More...
 
override bool IsMessage [get, set]
 Indicates whether the node is a top level message. Returns true if the node is a message (an instance of IMMessage). More...
 
List< IMNodeChildNodes [get]
 Returns a list of the children of the record. More...
 
int ChildCount [get]
 Returns the number of child nodes defined. More...
 

Detailed Description

Base implementation of IMRecord.

Implementation records must extend this (but NOT implementation messages which must extend MMessageImpl.

Constructor & Destructor Documentation

PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.MRecordImpl ( string  name,
MRecordImpl  parent,
Multiplicity  multiplicity 
)
protected

Constructor.

Parameters
name
parent
multiplicity

Member Function Documentation

IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddCustomField ( string  name,
Multiplicity  multiplicity,
ICustomFieldHandler  handler 
)

Adds a new child field with custom data type.

Parameters
nameThe name of the child field.
multiplicityThe multiplicity of the child field within this record.
handlerA custom field handler that defines the behaviour of the custom data type.
Returns
The new child field.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddCustomField ( string  name,
Multiplicity  multiplicity,
string  handler 
)

Adds a new child field with custom data type.

Parameters
nameThe name of the child field.
multiplicityThe multiplicity of the child field within this record.
handlerThe class name of a custom field handler that defines the behaviour of the custom data type.
Returns
The new child field.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddField ( string  name)

Adds a new child field with default multiplicity and data type.

Parameters
nameThe name of the child field.
Returns
The new child field.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddField ( string  name,
Multiplicity  multiplicity 
)

Adds a new child field with default data type.

Parameters
nameThe name of the child field.
multiplicityThe multiplicity of the child field within this record.
Returns
The new child field.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddField ( string  name,
MDataType  dataType 
)

Adds a new child field with default multiplicity.

Default multiplicity may vary by implementation but is typically singleRequired.

Parameters
nameThe name of the child field.
dataTypeTHe data type of the child field.
Returns
The new child field.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddField ( string  name,
MDataType  dataType,
Multiplicity  multiplicity 
)

Adds a new child field.

Parameters
nameThe name of the child field.
dataTypeThe data type of the child field.
multiplicityThe multiplicity of the child field within this record.
Returns
The new child field.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMRecord PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddRecord ( string  name)

Adds a new child record with default multiplicity.

Default multiplicity may vary by implementation but is typically singleRequired.

Parameters
nameThe name of the child record.
Returns
The new child record.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMRecord PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.AddRecord ( string  name,
Multiplicity  multiplicity 
)

Adds a new child record.

Parameters
nameThe name of the child record.
multiplicityThe multiplicity of the child record within this record.
Returns
The new child record.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

abstract void PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.CheckAddField ( string  name,
MDataType  dataType,
Multiplicity  multiplicity 
)
protectedpure virtual
abstract void PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.CheckAddRecord ( string  name,
Multiplicity  multiplicity 
)
protectedpure virtual
MNodeImpl PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.ChildAfter ( MNodeImpl  child)

Return the child after the specified child, or null if none.

Parameters
child
Returns
MNodeImpl PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.ChildBefore ( MNodeImpl  child)

Return the child before the specified child, or null if none.

Parameters
child
Returns
abstract MFieldImpl PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.CreateField ( string  name,
MDataType  dataType,
Multiplicity  multiplicity 
)
protectedpure virtual

Create a field.

Parameters
nameAlready non-null and validated for duplicate etc.
dataTypeWill never be 'None'.
multiplicityWill never be null.
Returns

Implemented in PushTechnology.DiffusionCore.Messaging.Data.metadata.record.MRecordRecord, PushTechnology.DiffusionCore.Messaging.Data.metadata.MMessageImpl, and PushTechnology.DiffusionCore.Messaging.Data.metadata.record.MRecordMessage.

abstract MRecordImpl PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.CreateRecord ( string  name,
Multiplicity  multiplicity 
)
protectedpure virtual

Child a child record.

This is implementation specific and must create the implementation concrete record. It must also validate whether creating a record as specified is allowed. It does not need to check for duplicate names.

Parameters
nameNon-null and validated record name.
multiplicityWill never be null but must be validated.
Returns
A new record.

Implemented in PushTechnology.DiffusionCore.Messaging.Data.metadata.record.MRecordMessage, PushTechnology.DiffusionCore.Messaging.Data.metadata.MMessageImpl, and PushTechnology.DiffusionCore.Messaging.Data.metadata.record.MRecordRecord.

IMNode PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.GetChild ( int  index)

Gets the child at a given index.

Parameters
indexThe index.
Returns
The child at the given index.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

int PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.GetChildIndex ( string  name)

Get the index of the named child.

Parameters
name
Returns
IMField PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.GetField ( string  name)

Gets a child field by name.

Parameters
nameThe field name.
Returns
The named child field, or null if no child field with the given name exists.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

IMRecord PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.GetRecord ( string  name)

Gets a child record by name.

Parameters
nameThe record name.
Returns
The named child record, or null if no child record with the given name exists.

Implements PushTechnology.DiffusionCore.Messaging.Data.metadata.IMRecord.

MNodeImpl PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.LastChild ( )

Return the last child of this record, or null if no children.

Returns
override string PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.ToString ( )

Returns this object as a human-readable string.

Returns

Property Documentation

int PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.ChildCount
get

Returns the number of child nodes defined.

List<IMNode> PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.ChildNodes
get

Returns a list of the children of the record.

abstract Multiplicity PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.DefaultChildMultiplicity
getprotected

Returns the implementation specific default multiplicity.

MDataType PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.DefaultDataType
getprotected

override bool PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.IsField
getset

Indicates whether the node is a field. Returns true if the node is a field (an instance of IMField).

override bool PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.IsMessage
getset

Indicates whether the node is a top level message. Returns true if the node is a message (an instance of IMMessage).

override bool PushTechnology.DiffusionCore.Messaging.Data.metadata.MRecordImpl.IsRecord
getset

Indicates whether the node is a record. Returns true if the node is a record (an instance of IMRecord). Note that a message (instance of IMMessage) is considered to be a record.