home *** CD-ROM | disk | FTP | other *** search
- // Copyright (c) 1994, University of Kansas, All Rights Reserved
- //
- // Class: TextAttribute
- // Include File: textattr.h
- // Purpose: Implement a way of giving a WWW style of attribute to
- // a segment of a stream of data.
- // Remarks/Portability/Dependencies/Restrictions:
- // The difference between the start and end of an attribute is
- // called extent. Extent can be considered a correlation to
- // calling strlen on a string.
- // An extent of 0 means no duration, 1 means 1 byte, etc...
- // A negative extent is equivalent to 0 extent.
- // Once an attribute type is set by the constructor, it can
- // never be changed.
- // Revision History:
- // 02-01-94 created
- // 02-09-94 Split all members into seperate files.
- #include"textattr.h"
-
- signed long int TextAttribute::getExtent() const {
- // Purpose: Return the duration of an attribute.
- // Arguments: void
- // Return Value: signed long int The duration of the attribute.
- // Remarks/Portability/Dependencies/Restrictions:
- // A negative durations is equivalent to no extent, or 0.
- // Revision History:
- // 02-01-94 created
-
- return(sli_StreamOffset > sli_StreamExtent ? 0L : sli_StreamExtent -
- sli_StreamOffset);
- }
-