DOFTypeContext ClassOpenDOF Object Access Library
Manages a set of type definitions that can refer to each other by using indexes.
Inheritance Hierarchy

SystemObject
  org.opendof.core.oalDOFTypeContext

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public sealed class Context

The DOFTypeContext type exposes the following members.

Methods

  NameDescription
Public methodcreate(Boolean, DOFPacket)
Create a type from a buffer that is pointing to a reference to the type in the context.
Public methodcreate(Boolean, DOFTypeContextResolver, DOFPacket)
Create a type from a buffer that is pointing to a reference to the type in the context.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodisFullyDefined
Return whether or not the context is operating in fully-defined mode (returning only fully defined types).
Public methodmarshal(DOFPacket)
Write the context to the specified packet.
Public methodmarshal(DOFType, DOFPacket)
Write a reference to the specified type into a packet.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Manages a set of type definitions that can refer to each other by using indexes.

A context is always necessary when reading and writing DOFType instances. The context is conceptually simple, but difficult in practice. The problem is that the order in which the different references are required is not strictly defined. This means that reading a type from the context may immediately require that a type found later in the context, and the recursion must be handled correctly.

The implementation must also guard against improper wire formats that contain self-references which would cause infinite recursion.

WARNING: None of the methods in this class are thread-safe. Therefore any potential for use of a Context object by more than one Thread must be synchronized.

See Also

Reference