📄 cimdatetime.h
字号:
*/ 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 cDT 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& cDT) const; /** Adds two CIMDateTime objects, returns the sum and changes the value of the calling CIMDateTime object to match the return value. @param cDT 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& cDT); /** Subtracts one CIMDateTime object from another and returns a CIMDateTime object that represents the difference. @param cDT 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& cDT) 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 cDT 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& cDT); /** 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 num) 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 num); /** 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 cDT 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& cDT) const; /** Compare two CIMDateTime objects and returns true if the LHS is less than or equal to the RHS. @param cDT 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& cDT) const; /** Compare two CIMDateTime objects and returns true if the LHS is greater than the RHS. @param cDT 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 & cDT) const; /** Compare two CIMDateTime objects and returns true if the LHS is greater than or equal to the RHS. @param cDT 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 & cDT) const; /** Compare two CIMDateTime objects and returns true if the LHS is not equal to the RHS. @param cDT 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 & cDT) const;private: CIMDateTimeRep* _rep; Boolean _set(const String & dateTimeStr); enum Field {ONLY_WILD_CARDS, SOME_WILD_CARDS, ONLY_DIGITS, ERR}; Field fieldcheck(const String & in_p, String & rep_field); Boolean restOfFields(Uint32 start_position,const String & inStr); Uint64 _toMicroSeconds(); void convertToUTC(); void setUtcOffSet(Sint32 utc); void insert_WildCard(Uint32 index); Uint32 getHighestWildCardPosition(const CIMDateTime & cDT_s);};/** 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_DateTime_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -