Class: TRecordField

Declaration: Record.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TRecordDoubleField TRecordFieldOf TRecordLongField TRecordShortField TRecordUnsignedCharField

Purpose:

This abstract class is a generic wrapper for data fields in a record.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

Providers need to derive from this class and define appropriate constructors.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TRecordField::~TRecordField

virtual ~ TRecordField ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::CanAssignTo

virtual bool CanAssignTo (const TRecordField &) const

Interface Category:

API.

Purpose:

Determines if the current instance can be assigned to the given field. Use this member function to prevent an exception being thrown in an attempt to assign incompatible fields.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the current instance can be assigned to the given field.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::Name

static const ClassName & Name ()

Interface Category:

API.

Purpose:

Returns the class name of the class.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The class name of the class.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::DescendsFrom

static bool DescendsFrom (const ClassName & className)

Interface Category:

API.

Purpose:

Determines if this class or instance derives from the named class.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if this class or instance derives from the named class.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::IsNull

virtual bool IsNull () const

Interface Category:

API.

Purpose:

Determines if this field is null, that is, has no value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if this field is null.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::MakeNull

virtual void MakeNull ()

Interface Category:

API.

Purpose:

Assigns null to this field.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::TRecordField

  1. TRecordField ()
  2. TRecordField (const TRecordField &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and any other function that needs to construct an uninitialized object.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::operator=

TRecordField & operator =(const TRecordField &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object. This operator assigns the data contents of one field to another.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::ThisName

virtual const ClassName & ThisName ()

Interface Category:

API.

Purpose:

Returns the class name of the instance. This is similar to the Name member function, but supports polymorphic access using TRecordFieldHandle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The class name of the instance.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::ThisDescendsFrom

virtual bool ThisDescendsFrom (const ClassName & className)

Interface Category:

API.

Purpose:

Determines if the associated field descends from the named TRecordField class.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the associated field descends from the named TRecordField class.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRecordField::SetNull

virtual void SetNull (bool isNull)

Interface Category:

API.

Purpose:

Sets the field to hold or not hold a null value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.