MongoDB C++ Driver  legacy-1.0.5
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
timestamp.h
1 /*
2  * Copyright 2014 MongoDB Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include "mongo/platform/cstdint.h"
20 
21 namespace mongo {
22 
23  class Timestamp_t {
24  public:
25  Timestamp_t()
26  : _seconds()
27  , _increment()
28  {}
29 
30  Timestamp_t(const uint32_t seconds, const uint32_t increment)
31  : _seconds(seconds)
32  , _increment(increment)
33  {}
34 
35  uint32_t seconds() const { return _seconds; }
36  uint32_t increment() const { return _increment; }
37 
38  private:
39  const uint32_t _seconds;
40  const uint32_t _increment;
41  };
42 
43 } // namespace mongo
Definition: timestamp.h:23
the main MongoDB namespace
Definition: bulk_operation_builder.h:24