⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cimdatetime.h

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 H
📖 第 1 页 / 共 2 页
字号:
        Uint32 seconds,        Uint32 microseconds,        Uint32 numSignificantMicrosecondDigits,        Sint32 utcOffset);    /** Create datetime interval from components.        @param days a number from 0 to 99999999        @param hours a number from 0 to 23 (or CIMDateTime::WILDCARD)        @param minutes a number from 0 to 59 (or CIMDateTime::WILDCARD)        @param seconds a number from 0 to 59 (or CIMDateTime::WILDCARD)        @param microseconds a number from 0 to 999999        @param numSignificantMicrosecondDigits the number of decimal digits of            the microseconds parameter (from left to right) that are            significant (all others are wildcarded) or six if they are all            significant.        @exception DateTimeOutOfRangeException.    */    void setInterval(        Uint32 days,        Uint32 hours,        Uint32 minutes,        Uint32 seconds,        Uint32 microseconds,        Uint32 numSignificantMicrosecondDigits);#endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */    /** Clears the datetime class object.  The date time is set to        a zero interval value.    */    void clear();    /** Returns the current local time in a CIMDateTime object.        @return CIMDateTime object containing the current local date and time.    */    static CIMDateTime getCurrentDateTime();    /** Computes the difference in microseconds between two CIMDateTime time        stamps or two CIMDateTime intervals.        @param startTime  Contains the start datetime.        @param finishTime  Contains the finish datetime.        @return An integer that contains the difference between the two        datetime values (in microseconds).        @exception InvalidDateTimeFormatException If arguments are not the same        type of CIMDateTime.    */    static Sint64 getDifference(CIMDateTime startTime, CIMDateTime finishTime);    /** Checks whether the datetime is an interval.        @return True if the datetime is an interval value, false otherwise.    */    Boolean isInterval() const;    Boolean isInterval();#ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES    /** Checks whether the datetime is a timestamp.        @return True if so.    */    Boolean isTimeStamp() const;#endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */    /** Compares the CIMDateTime object to another CIMDateTime object for        equality.        @param x  CIMDateTime object to be compared.        @return true if the two CIMDateTime objects are equal, false otherwise        @exception TypeMismatchException If arguments are of different types.    */    Boolean equal(const CIMDateTime& x) const;    /** Converts a CIMDateTime object to its microsecond representation.        @return Number of microseconds since the epoch (for time stamps) or        in a span of time (for intervals).        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.    */    Uint64 toMicroSeconds() const;    /** Adds two CIMDateTime objects and returns a CIMDateTime object that        represents the sum.        @param x operand on the RHS of the operator        @return A CIMDateTime object that is the result of adding the calling        object to the RHS operand        @exception DateTimeOutOfRangeException If the operation causes an        overflow condition.        @exception TypeMismatchException If the operands are not type        compatible (see table of operations).    */    CIMDateTime operator+(const CIMDateTime& x) const;    /** Adds two CIMDateTime objects, returns the sum and changes        the value of the calling CIMDateTime object to match the return value.        @param x operand on the RHS of the operator        @return A CIMDateTime object that is the result of adding the calling        object to the RHS operand        @exception DateTimeOutOfRangeException If the operation causes an        overflow condition.        @exception TypeMismatchException If the operands are not type        compatible (see table of operations).    */    CIMDateTime & operator+=(const CIMDateTime& x);    /** Subtracts one CIMDateTime object from another and returns a        CIMDateTime object that represents the difference.        @param x operand on the RHS of the operator        @return A CIMDateTime object that is the result of subtracting the        the RHS object from the calling.        @exception DateTimeOutOfRangeException If the operation causes an        underflow condition or conversion to UTC (an internal operation)        causes an overflow condition.        @exception TypeMismatchException If the operands are not type        compatible (see table of operations).    */    CIMDateTime operator-(const CIMDateTime& x) const;    /** Subtracts one CIMDateTime object from another, returns the difference        and changes the value of the calling CIMDateTime object to match the        return value.        @param x operand on the RHS of the operator        @return A CIMDateTime object that is the result of subtracting the        object on the RHS from the calling object.        @exception DateTimeOutOfRangeException If the operation causes an        underflow condition or conversion to UTC (an internal operation)        causes an overflow condition.        @exception TypeMismatchException If the operands are not type        compatible (see table of operations).    */    CIMDateTime & operator-=(const CIMDateTime& x);    /** Multiplies a CIMDateTime object by an integer and returns a CIMDateTime        object that represents the product.        @param num integer operand on the RHS of the operator        @return A CIMDateTime object that is the result of multiplying the        calling object by the RHS operand.        @exception DateTimeOutOfRangeException If the operation causes an        overflow condition.        @exception TypeMismatchException If the operands are not type        compatible (see table of operations).    */    CIMDateTime operator*(Uint64 x) const;    /** Multiplies a CIMDateTime object by an integer, returns the product        and changes the value of the calling object to match the returned        product.        @param num integer operand on the RHS of the operator        @return A CIMDateTime object that is the result of multiplying the        calling object by the RHS operand.        @exception DateTimeOutOfRangeException If the operation causes an        overflow condition.        @exception TypeMismatchException If the operands are not type        compatible (see table of operations).    */    CIMDateTime & operator*=(Uint64 x);    /** Divides a CIMDateTime object by an integer and returns a CIMDateTime        object that represents the quotient.        @param num integer operand on the RHS of the operator        @return A CIMDateTime object that is the result of dividing the calling        object by the RHS operand.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException If the CIMDateTime object does not        hold an interval value (see table of operations).        @exception Exception if param num is zero.    */    CIMDateTime operator/(Uint64 num) const;    /** Divides a CIMDateTime object by an integer, returns the quotient        and changes the value of the calling object to match the returned        quotient.        @param num integer operand on the RHS of the operator        @return A CIMDateTime object that is the result of dividing the calling        object by the RHS operand.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException If the CIMDateTime object does not        hold an interval value (see table of operations).        @exception Exception if param num is zero.    */    CIMDateTime & operator/=(Uint64 num);    /** Divides a CIMDateTime object by another CIMDateTime object and returns        an integer quotient.        @param cdt CIMDateTime object on the RHS of the operator        @return An integer that is the result of dividing the number of        microseconds represented by the calling CIMDateTime object by the        number of microseconds represented by the CIMDateTime object on the        RHS of the operator.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException If the operands are not type        compatible (see table of operations).    */    Uint64 operator/(const CIMDateTime& cdt) const;    /** Compare two CIMDateTime objects and returns true if the LHS is        less than the RHS.        @param x operand on the RHS of the operator        @return true if the LHS is less than the RHS, false otherwise.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException if operands are not of the same        type.     */    Boolean operator<(const CIMDateTime& x) const;    /** Compare two CIMDateTime objects and returns true if the LHS is        less than or equal to the RHS.        @param x operand on the RHS of the operator        @return true if the LHS is less than or equal to the RHS, false        otherwise.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException if operands are not of the same        type.    */    Boolean operator<=(const CIMDateTime& x) const;    /** Compare two CIMDateTime objects and returns true if the LHS is        greater than the RHS.        @param x operand on the RHS of the operator        @return true if the LHS is greater than the RHS, false otherwise.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException if operands are not of the same        type.    */    Boolean operator>(const CIMDateTime & x) const;    /** Compare two CIMDateTime objects and returns true if the LHS is        greater than or equal to the RHS.        @param x operand on the RHS of the operator        @return true if the LHS is greater than or equal to the RHS, false        otherwise.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException if operands are not of the same        type.    */    Boolean operator>=(const CIMDateTime & x) const;    /** Compare two CIMDateTime objects and returns true if the LHS is        not equal to the RHS.        @param x operand on the RHS of the operator        @return true if the LHS is not equal to RHS, false otherwise.        @exception DateTimeOutOfRangeException If conversion to UTC (an        internal operation) causes an overflow condition.        @exception TypeMismatchException if operands are not of the same        type.    */    Boolean operator!=(const CIMDateTime & x) const;private:    CIMDateTimeRep* _rep;    CIMDateTime(CIMDateTimeRep*);};/** Compares two CIMDateTime objects and returns true if they represent the    same time or length of time.    @param x one of the CIMDateTime objects to be compared    @param y one of the CIMDateTime objects to be compared    @return true if the two objects passed in represent the same time or    length of time, false otherwise.*/PEGASUS_COMMON_LINKAGE Boolean operator==(    const CIMDateTime& x,    const CIMDateTime& y);#define PEGASUS_ARRAY_T CIMDateTime# include <Pegasus/Common/ArrayInter.h>#undef PEGASUS_ARRAY_TPEGASUS_NAMESPACE_END#endif /* Pegasus_CIMDateTime_h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -