ASN1CUTCTime Class Reference
[Date and Time Runtime Classes]

#include <ASN1CUTCTime.h>

Inheritance diagram for ASN1CUTCTime:
ASN1CTime ASN1CType

List of all members.

Public Member Functions

EXTRTMETHOD ASN1CUTCTime (OSRTMessageBufferIF &msgBuf, char *&buf, int bufSize, OSBOOL useDerRules=FALSE)
EXTRTMETHOD ASN1CUTCTime (OSRTMessageBufferIF &msgBuf, ASN1UTCTime &buf, OSBOOL useDerRules=FALSE)
EXTRTMETHOD ASN1CUTCTime (OSRTContext &ctxt, char *&buf, int bufSize, OSBOOL useDerRules=FALSE)
EXTRTMETHOD ASN1CUTCTime (OSRTContext &ctxt, ASN1UTCTime &buf, OSBOOL useDerRules=FALSE)
 ASN1CUTCTime (const ASN1CUTCTime &original)
EXTRTMETHOD int setTime (time_t time, OSBOOL diffTime)
const ASN1CUTCTimeoperator= (const ASN1CUTCTime &tm)

Protected Member Functions

virtual ASN1TTimegetTimeObj ()
virtual const ASN1TTimegetTimeObj () const
EXTRTMETHOD ASN1CUTCTime (char *&buf, int bufSize, OSBOOL useDerRules=FALSE)
EXTRTMETHOD ASN1CUTCTime (ASN1UTCTime &buf, OSBOOL useDerRules=FALSE)
EXTRTMETHOD int compileString ()
EXTRTMETHOD int getFraction ()
EXTRTMETHOD int setFraction (int fraction)

Protected Attributes

ASN1TUTCTime timeObj

Detailed Description

ASN.1 UTCTime control class. The ASN1CUTTime class is derived from the ASN1CTime base class. It used as the bass class for generated control classes for the ASN.1 Universal Time ([UNIVERSAL 23] IMPLICIT VisibleString) type. This class provides utility methods for operating on the time information referenced by the generated class. This class can also be used inline to operate on the time within generated time string elements in a SEQUENCE, SET, or CHOICE construct. The string generally is encoded according to ISO 8601 format with some exceptions (see X.680).


Constructor & Destructor Documentation

EXTRTMETHOD ASN1CUTCTime::ASN1CUTCTime ( OSRTMessageBufferIF &  msgBuf,
char *&  buf,
int  bufSize,
OSBOOL  useDerRules = FALSE 
)

This constructor creates a time string from a buffer.

It does not deep-copy the data, it just assigns the passed array to an internal reference variable. The object will then directly operate on the given data variable.

Parameters:
msgBuf Reference to an ASN1MEssage buffer derived object (for example, an ASN1BEREncodeBuffer).
buf Reference to a pointer to a time string buffer.
bufSize Size of passed buffer, in bytes.
useDerRules Use the Distinguished Encoding Rules to encode or decode the value,
EXTRTMETHOD ASN1CUTCTime::ASN1CUTCTime ( OSRTMessageBufferIF &  msgBuf,
ASN1UTCTime &  buf,
OSBOOL  useDerRules = FALSE 
)

This constructor creates a time string suing the ASN1UTCTime argument. c The constructor does not deep-copy the variable, it assigns a referene to it to an internal variable. The object will then directly operate on the given data variable. This form of the constructor is used with a compiler-generated time string variable.

Parameters:
msgBuf Reference to an ASN1MEssage buffer derived object (for example, an ASN1BEREncodeBuffer).
buf Reference to a time string structure.
useDerRules Use the Distinguished Encoding Rules to encode or decode the value,

Member Function Documentation

EXTRTMETHOD int ASN1CUTCTime::compileString (  )  [protected, virtual]

Compiles new time string accoring X.680 and ISO 8601.

Returns:
0 on success, or an error code if there was an error.

Implements ASN1CTime.

EXTRTMETHOD int ASN1CUTCTime::getFraction (  )  [protected, virtual]

This method returns the second's decimal component of the time value.

Second's decimal fraction is represented by one or more digits from 0 to 9. Note that the return value may differ for different inherited ASN1CTime classes.

Parameters:
- none
Returns:
Second's decimal fraction component (0 - 9) is returned if operation is successful. If the operation fails, a negative value is returned.

Reimplemented from ASN1CTime.

EXTRTMETHOD int ASN1CUTCTime::setTime ( time_t  time,
OSBOOL  diffTime 
) [virtual]

Converts time_t to time string.

Parameters:
time time to convert,
diffTime TRUE means the difference between local time and UTC will be calculated; in other case only local time will be stored.
Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.

Implements ASN1CTime.


The documentation for this class was generated from the following file: