Class: TDocumentNameAttribute

Declaration: BasicDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDocumentAttribute

Inherited By:

None.

Purpose:

TDocumentNameAttribute is used to specify the name of the document. Use this class and attach it as an attribute to the document to give the document a name. Use TAbstractDocument's SetName and GetName functions to set and get the document's name.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TDocumentNameAttribute::TDocumentNameAttribute

  1. TDocumentNameAttribute ()
  2. TDocumentNameAttribute ( const TText &)
  3. TDocumentNameAttribute ( const TDocumentNameAttribute & );

Interface Category:

API.

Purpose:

  1. Default constructor. Constructs an empty name attribute.
  2. Creates a document name attribute from the given TText.
  3. Copy constructor.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::~TDocumentNameAttribute

~ TDocumentNameAttribute ()

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:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::GetDocumentName

const TText* GetDocumentName() const

Interface Category:

API.

Purpose:

Returns an alias to the document name attribute's own internal copy of the document's name.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the name of the document.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::operator>>=

virtual TStream & operator >>=(TStream & towhere) 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:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

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 a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash key for use by the collection classes.

Calling Context:

Called directly by any collection class.

Parameters:

Return Value:

Returns the hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::operator=

TDocumentNameAttribute & operator =(const TDocumentNameAttribute &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::operator==

operator ==(const TText &) const

Interface Category:

API.

Purpose:

Tests whether the two objects on either side of the ==symbol are equal.

Calling Context:

Call this function by using the operator in an expression.

Parameters:

Return Value:

Returns true if the two objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentNameAttribute::operatorconstTText&

operator const TText & () const

Interface Category:

API.

Purpose:

Conversion to TText. Allows this object to be used where a TText& is accepted.

Calling Context:

Call this function directly.

Parameters:

Return Value:

const TText& -Returns the name as text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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.