ASN1C C/C++ Common Runtime
ASN1C v7.6.x
|
#include <ASN1CUTCTime.h>
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 ASN1CUTCTime & | operator= (const ASN1CUTCTime &tm) |
Public Member Functions inherited from ASN1CTime | |
EXTRTMETHOD | ASN1CTime (OSRTMessageBufferIF &msgBuf, char *&buf, OSSIZE bufSize, OSBOOL useDerRules) |
EXTRTMETHOD | ASN1CTime (OSRTMessageBufferIF &msgBuf, ASN1VisibleString &buf, OSBOOL useDerRules) |
EXTRTMETHOD | ASN1CTime (OSRTContext &ctxt, char *&buf, OSSIZE bufSize, OSBOOL useDerRules) |
EXTRTMETHOD | ASN1CTime (OSRTContext &ctxt, ASN1VisibleString &buf, OSBOOL useDerRules) |
EXTRTMETHOD | ASN1CTime (const ASN1CTime &original) |
EXTRTMETHOD | ~ASN1CTime () |
virtual EXTRTMETHOD int | getYear () |
virtual EXTRTMETHOD int | getMonth () |
virtual EXTRTMETHOD int | getDay () |
virtual EXTRTMETHOD int | getHour () |
virtual EXTRTMETHOD int | getMinute () |
virtual EXTRTMETHOD int | getSecond () |
virtual EXTRTMETHOD double | getFractionAsDouble () |
virtual EXTRTMETHOD int | getFractionStr (char *const pBuf, size_t bufSize) |
virtual EXTRTMETHOD int | getFractionLen () |
virtual EXTRTMETHOD int | getDiffHour () |
virtual EXTRTMETHOD int | getDiffMinute () |
virtual EXTRTMETHOD int | getDiff () |
virtual EXTRTMETHOD OSBOOL | getUTC () |
virtual EXTRTMETHOD time_t | getTime () |
void | setDER (OSBOOL bvalue) |
virtual EXTRTMETHOD int | setUTC (OSBOOL utc) |
virtual EXTRTMETHOD int | setYear (short year_) |
virtual EXTRTMETHOD int | setMonth (short month_) |
virtual EXTRTMETHOD int | setDay (short day_) |
virtual EXTRTMETHOD int | setHour (short hour_) |
virtual EXTRTMETHOD int | setMinute (short minute_) |
virtual EXTRTMETHOD int | setSecond (short second_) |
virtual EXTRTMETHOD int | setFraction (int fraction, int fracLen=-1) |
virtual EXTRTMETHOD int | setFraction (double frac, int fracLen) |
virtual EXTRTMETHOD int | setFraction (char const *frac) |
virtual EXTRTMETHOD int | setDiffHour (short dhour) |
virtual EXTRTMETHOD int | setDiff (short dhour, short dminute) |
virtual EXTRTMETHOD int | setDiff (short inMinutes) |
virtual EXTRTMETHOD int | parseString (const char *string) |
virtual EXTRTMETHOD void | clear () |
virtual EXTRTMETHOD int | equals (ASN1CTime &) |
EXTRTMETHOD OSSIZE | getTimeStringLen () |
EXTRTMETHOD const char * | getTimeString (char *pbuf, OSSIZE bufsize) |
EXTRTMETHOD const ASN1CTime & | operator= (const ASN1CTime &) |
virtual EXTRTMETHOD OSBOOL | operator== (ASN1CTime &) |
virtual EXTRTMETHOD OSBOOL | operator!= (ASN1CTime &) |
virtual EXTRTMETHOD OSBOOL | operator> (ASN1CTime &) |
virtual EXTRTMETHOD OSBOOL | operator< (ASN1CTime &) |
virtual EXTRTMETHOD OSBOOL | operator>= (ASN1CTime &) |
virtual EXTRTMETHOD OSBOOL | operator<= (ASN1CTime &) |
Public Member Functions inherited from ASN1CType | |
EXTRTMETHOD | ASN1CType (OSRTMessageBufferIF &msgBuf) |
EXTRTMETHOD | ASN1CType (const ASN1CType &orig) |
virtual | ~ASN1CType () |
void | append (OSRTDList &llist, void *pdata) |
OSRTCtxtPtr | getContext () |
OSCTXT * | getCtxtPtr () |
char * | getErrorText (char *textbuf=(char *) 0, OSSIZE bufsize=0) |
int | getStatus () const |
void * | memAlloc (OSSIZE numocts) |
void * | memAllocZ (OSSIZE numocts) |
void | memFreeAll () |
void * | memRealloc (void *ptr, OSSIZE numocts) |
void | memReset () |
void | memFreePtr (void *ptr) |
void | printErrorInfo () |
void | resetError () |
OSBOOL | setDiag (OSBOOL value) |
virtual EXTRTMETHOD int | Encode () |
virtual EXTRTMETHOD int | Decode (OSBOOL free=FALSE) |
virtual int | EncodeTo (OSRTMessageBufferIF &) |
virtual int | DecodeFrom (OSRTMessageBufferIF &, OSBOOL free=TRUE) |
virtual void | MemFree () |
Protected Member Functions | |
virtual ASN1TTime & | getTimeObj () |
virtual const ASN1TTime & | getTimeObj () 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 Member Functions inherited from ASN1CTime | |
EXTRTMETHOD void | checkCapacity () |
EXTRTMETHOD char *& | getTimeStringPtr () |
EXTRTMETHOD | ASN1CTime (char *&buf, OSSIZE bufSize, OSBOOL useDerRules) |
EXTRTMETHOD | ASN1CTime (ASN1VisibleString &buf, OSBOOL useDerRules) |
Protected Member Functions inherited from ASN1CType | |
EXTRTMETHOD | ASN1CType () |
EXTRTMETHOD | ASN1CType (OSRTContext &ctxt) |
EXTRTMETHOD int | setMsgBuf (OSRTMessageBufferIF &msgBuf, OSBOOL initBuf=FALSE) |
EXTRTMETHOD int | setRunTimeKey (const OSOCTET *key, OSSIZE keylen) |
Protected Attributes | |
ASN1TUTCTime | timeObj |
Protected Attributes inherited from ASN1CTime | |
OSBOOL | parsed |
OSBOOL | derRules |
char *& | timeStr |
OSSIZE | strSize |
Protected Attributes inherited from ASN1CType | |
OSRTCtxtPtr | mpContext |
OSRTMessageBufferIF * | mpMsgBuf |
Additional Inherited Members | |
Public Types inherited from ASN1CTime | |
enum | { January = 1, Jan = 1, February = 2, Feb = 2, March = 3, Mar = 3, April = 4, Apr = 4, May = 5, June = 6, Jun = 6, July = 7, Jul = 7, August = 8, Aug = 8, September = 9, Sep = 9, October = 10, Oct = 10, November = 11, Nov = 11, December = 12, Dec = 12 } |
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).
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.
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.
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, |
|
protectedvirtual |
Compiles new time string accoring X.680 and ISO 8601.
Implements ASN1CTime.
|
protectedvirtual |
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.
- | none |
Reimplemented from ASN1CTime.
|
virtual |
Converts time_t to time string.
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. |
Implements ASN1CTime.