Assign an IndirectObject to this Element.

 

   

Syntax
 

[C#]
virtual bool Assign(IndirectObject obj)
virtual bool Assign(Atom host, IndirectObject atom)

[Visual Basic]
Overridable Function Assign(obj As IndirectObject) As Boolean
Overridable Function Assign(host As Atom, atom As IndirectObject) As Boolean

 

Throws Exceptions NullReferenceException: Thrown if the atom or host provided is null.

 

   

Params
 
Name Description
obj The IndirectObject to be assigned to this Element.
host An IndirectObject closely associated with this Atom - ideally the one that contains it.
atom The Atom to be assigned to this Element.
return Whether the assignment was made successfully.

 

   

Notes
 

Assign an IndirectObject to this Element.

The process of assignment allows an existing IndirectObject to be viewed through the lens of a particular type of Element.

It is important to ensure that IndirectObjects are assigned to appropriate types of Element.

For example, while is is possible to assign a Page Indirect Object to an Image Element, such an assignment is not going to produce any useful view of the data.

In addition, some assignments cannot be made at all. This occurs if if the underlying atom types are inconsistent.

For example a ColorSpaceElement is based around an ArrayAtom, so attempting to assign an IndirectObject which contains a DictAtom will result in failure.

Classes that inherit from this one may wish to override this function to ensure that the Atom type that is provided is acceptable.

 

   

Example
 
None.