activemq-cpp-3.8.2
Date.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _DECAF_UTIL_DATE_H_
19 #define _DECAF_UTIL_DATE_H_
20 
21 #include <decaf/util/Config.h>
22 #include <decaf/lang/Comparable.h>
23 #include <string>
24 
25 namespace decaf{
26 namespace util{
27 
34  class DECAF_API Date : public lang::Comparable<Date> {
35  private:
36 
40  long long time;
41 
42  public:
43 
48  Date();
49 
54  Date( long long milliseconds );
55 
60  Date( const Date& source );
61 
70  Date& operator= ( const Date& value );
71 
72  virtual ~Date();
73 
78  long long getTime() const;
79 
85  void setTime( long long milliseconds );
86 
93  bool after( const Date& when ) const;
94 
101  bool before( const Date& when ) const;
102 
124  std::string toString() const;
125 
126  public: // Comparable
127 
128  virtual int compareTo( const Date& value ) const;
129 
130  virtual bool equals( const Date& value ) const;
131 
132  virtual bool operator==( const Date& value ) const;
133 
134  virtual bool operator<( const Date& value ) const;
135 
136  };
137 
138 }}
139 
140 #endif /*_DECAF_UTIL_DATE_H_*/
#define DECAF_API
Definition: Config.h:29
bool operator==(const ArrayPointer< T > &left, const U *right)
Definition: ArrayPointer.h:379
Wrapper class around a time value in milliseconds.
Definition: Date.h:34
This interface imposes a total ordering on the objects of each class that implements it...
Definition: Comparable.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25