Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 53620200D31 for ; Sat, 4 Nov 2017 11:37:28 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 51BD9160BD5; Sat, 4 Nov 2017 10:37:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 11825160C1B for ; Sat, 4 Nov 2017 11:37:23 +0100 (CET) Received: (qmail 16757 invoked by uid 500); 4 Nov 2017 10:37:23 -0000 Mailing-List: contact commits-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list commits@arrow.apache.org Received: (qmail 16546 invoked by uid 99); 4 Nov 2017 10:37:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Nov 2017 10:37:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C2361F5E0F; Sat, 4 Nov 2017 10:37:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: uwe@apache.org To: commits@arrow.apache.org Date: Sat, 04 Nov 2017 10:37:26 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [08/51] [partial] arrow-site git commit: API doc update archived-at: Sat, 04 Nov 2017 10:37:28 -0000 http://git-wip-us.apache.org/repos/asf/arrow-site/blob/35e0e750/docs/cpp/decimal_8h_source.html ---------------------------------------------------------------------- diff --git a/docs/cpp/decimal_8h_source.html b/docs/cpp/decimal_8h_source.html index 2d67bfc..6e07638 100644 --- a/docs/cpp/decimal_8h_source.html +++ b/docs/cpp/decimal_8h_source.html @@ -67,27 +67,29 @@ $(function() {
decimal.h
-Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with 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,
12 // software distributed u nder the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
16 // under the License.
17 
18 #ifndef ARROW_DECIMAL_H
1 9 #define ARROW_DECIMAL_H
20 
21 #include <array>
22 #include <cstdint>
23 #include <string>
24 #include <type_traits>
25 
26 #include "arrow/status.h"< /span>
27 #include "arrow/util/visibility.h"
28 
29 namespace arrow {
30 
38 class ARROW_EXPORT Decimal128 {
39  public:
41  constexpr Decimal128(int64_t high, uint64_t low) : high_bits_(high), low_bits_(low) {}
42 
44  constexpr Decimal128() : Decimal128(0, 0) {}
45 
47  template <typename T,
48  typename = typename std::enable_if<std::is_integral<T>::value, T>::type>
49  constexpr Decimal128(T value)
50  : Decimal128(static_cast<int64_t>(value) >= 0 ? 0 : -1,
51  static_cast<uint64_t>(value)) {}
52 
54  explicit Decimal128(const std::string& value);
55 
57  explicit Decimal128(const uint8_t* bytes);
58 
60  Decimal128& Negate();
61 
63  Decimal128& operator+=(const Decimal128& right);
64 
66  Decimal128& operator-=(const Decimal128& right);
67 
69  Decimal128& operator*=(const Decimal128& right);
70 
80  Status Divide(const Decimal128& divisor, Decimal128* result,
81  Decimal128* remainder) const;
82 
84  Decimal128& operator/=(const Decimal128& right);
85 
87  explicit operator char() const;
88 
90  Decimal128& operator|=(const Decimal128& right);
91 
93  Decimal128& operator&=(const Decimal128& right);
94 
96  Decimal128& operator<<=(uint32_t bits);
97 
99  Decimal128& operator>>=(uint32_t bits);
100 
102  int64_t high_bits() const { return high_bits_; }
103 
105  uint64_t low_bits() const { return low_bits_; }
106 
108  std::array<uint8_t, 16> ToBytes() const;
109 
112  std::string ToString(int precision, int scale) const;
113 
116  static Status FromString(const std::string& s, Decimal128* out,
117  int* precision = nullptr, int* scale = nullptr);
118 
119  private:
120  int64_t high_bits_;
121  uint64_t low_bits_;
122 };
123 
124 ARROW_EXPORT bool operator==(const Decimal128& left, const Decimal128& right);
125 ARROW_EXPORT bool operator!=(const Decimal1 28& left, const Decimal128& right);
126 ARROW_EXPORT bool operator<(const Decimal128& left, const Decimal128& right);
127 ARROW_EXPORT bool operator<=(const Decimal128& left, const Decimal128& right);
128 ARROW_EXPORT bool operator>(const Decimal128& left, const Decimal128& right);
129 ARROW_EXPORT bool operator>=(const Decimal128& left, const Decimal128& right);
130 
131 ARROW_EXPORT Decimal128 operator-(const Decimal128& operand);
132 ARROW_EXPORT Decimal128 operator+(const Decimal128& left, const Decimal128& right);
133 ARROW_EXPORT Decimal128 operator-(const Decimal128& left, const Decimal128& right);
134 ARROW_EXPORT Decimal128 operator*(const Decimal128& left, const Decimal128& right);
135 ARROW _EXPORT Decimal128 operator/(const Decimal128& left, const Decimal128& right);
136 ARROW_EXPORT Decimal128 operator%(const Decimal128& left, const Decimal128& right);
137 
138 } // namespace arrow
139 
140 #endif // ARROW_DECIMAL_H
Decimal128 operator*(const Decimal128 &left, const Decimal128 &right)
-
constexpr Decimal128(T value)
Convert any integer value into an Decimal128.
Definition: decimal.h:49
-
int64_t high_bits() const
Get the high bits of the two&#39;s complement representation of the number.
Definition: decimal.h:102
-
constexpr Decimal128(int64_t high, uint64_t low)
Create an Decimal128 from the two&#39;s complement representation.
Definition: decimal.h:41
+Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with 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,
12 // software distributed u nder the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
16 // under the License.
17 
18 #ifndef ARROW_DECIMAL_H
1 9 #define ARROW_DECIMAL_H
20 
21 #include <array>
22 #include <cstdint>
23 #include <string>
24 #include <type_traits>
25 
26 #include "arrow/status.h"< /span>
27 #include "arrow/util/macros.h"
28 #include "arrow/util/visibility.h"
29 
30 namespace arrow {
31 
39 class ARROW_EXPORT Decimal128 {
40  public:
42  constexpr Decimal128(int64_t high, uint64_t low) : high_bits_(high), low_bits_(low) {}
43 
45  constexpr Decimal128() : Decimal128(0, 0) {}
46 
48  template <typename T,
49  typename = typename std::enable_if<std::is_integral<T>::value, T>::type>
50  constexpr Decimal128(T value)
51  : Decimal128(static_cast<int64_t>(value) >= 0 ? 0 : -1,
52  static_cast<uint64_t>(value)) {}
53 
55  explicit Decimal128(const std::string& value);
56 
59  explicit Decimal128(const uint8_t* bytes);
60 
62  Decimal128& Negate();
63 
65  Decimal128& operator+=(const Decimal128& right);
66 
68  Decimal128& operator-=(const Decimal128& right);
69 
71  Decimal128& operator*=(const D ecimal128& right);
72 
82  Status Divide(const Decimal128& divisor, Decimal128* result,
83  Decimal128* remainder) const;
84 
86  Decimal128& operator/=(const Decimal128& right);
87 
89  explicit operator char() const;
90 
92  Decimal128& operator|=(const Decimal128& right);
93 
95  Decimal128& operator&=(const Decimal128& right);
96 
98  Decimal128& operator<<=(uint32_t bits);
99 
101  Decimal128& operator>>=(uint32_t bits);
102 
104  int64_t high_bits() const { return high_bits_; }
105 
107  uint64_t low_bits() const { return low_bits_; }
108 
110  std::array<uint8_t, 16> ToBytes() const;
111 
114  std::string ToString(int precision, int scale) const;
115 
118  static Status FromString(const std::string& s, Decimal128* out,
119  int* precision = NULLPTR, int* scale = NULLPTR);
120 
121  private:
122  int64_t high_bits_;
123  uint64_t low_bits_;
124 };
125 
126 ARROW_EXPORT bool operator==(const Decimal128& left, const Decimal128& right);
127 ARROW_EXPORT bool operator!=(const Decimal128& left, const Decimal128& right);
128 ARROW_EXPORT bool operator<(const Decimal128& left, const Decimal128& right);
129 ARROW_EXPORT bool operator<=(const Decimal128& left, const Decimal128& right);
130 ARROW_EXPORT bool operator>(const Decimal128& left, const Decimal128& right);
131 ARROW_EXPORT bool operator>=(const Decimal128& left, const Decimal128& right);
132 
133 ARROW_EXPORT Decimal128 operator-(const Decimal128& operand);
134 ARROW_EXPORT Decimal128 operator+(const Decimal128& left, const Decimal128& right);
135 ARROW_EXPORT Decimal128 operator-(const Decimal128& left, const Decimal128& right);
136 ARROW_EXPORT Decimal128 operator*(cons t Decimal128& left, const Decimal128& right);
137 ARROW_EXPORT Decimal128 operator/(const Decimal128& left, const Decimal128& right);
138 ARROW_EXPORT Decimal128 operator%(const Decimal128& left, const Decimal128& right);
139 
140 } // namespace arrow
141 
142 #endif // ARROW_DECIMAL_H
Decimal128 operator*(const Decimal128 &left, const Decimal128 &right)
+
constexpr Decimal128(T value)
Convert any integer value into an Decimal128.
Definition: decimal.h:50
+
int64_t high_bits() const
Get the high bits of the two&#39;s complement representation of the number.
Definition: decimal.h:104
+
constexpr Decimal128(int64_t high, uint64_t low)
Create an Decimal128 from the two&#39;s complement representation.
Definition: decimal.h:42
+
#define NULLPTR
Definition: macros.h:69
Decimal128 operator%(const Decimal128 &left, const Decimal128 &right)
bool operator<(const Decimal128 &left, const Decimal128 &right)
bool operator<=(const Decimal128 &left, const Decimal128 &right)
Decimal128 operator-(const Decimal128 &operand)
Definition: status.h:106
+
Decimal128 operator/(const Decimal128 &left, const Decimal128 &right)
-
bool operator!=(const stl_allocator< T1 > &lhs, const stl_allocator< T2 > &rhs) noexcept
Definition: allocator.h:93
+
bool operator!=(const stl_allocator< T1 > &lhs, const stl_allocator< T2 > &rhs) noexcept
Definition: allocator.h:94
Decimal128 operator+(const Decimal128 &left, const Decimal128 &right)
-
Top-level namespace for Apache Arrow C++ API.
Definition: allocator.h:28
+
Top-level namespace for Apache Arrow C++ API.
Definition: allocator.h:29
-
constexpr Decimal128()
Empty constructor creates an Decimal128 with a value of 0.
Definition: decimal.h:44
-
bool operator==(const stl_allocator< T1 > &lhs, const stl_allocator< T2 > &rhs) noexcept
Definition: allocator.h:88
+
constexpr Decimal128()
Empty constructor creates an Decimal128 with a value of 0.
Definition: decimal.h:45
+
bool operator==(const stl_allocator< T1 > &lhs, const stl_allocator< T2 > &rhs) noexcept
Definition: allocator.h:89
bool operator>=(const Decimal128 &left, const Decimal128 &right)
bool operator>(const Decimal128 &left, const Decimal128 &right)
-
Represents a signed 128-bit integer in two&#39;s complement.
Definition: decimal.h:38
-
uint64_t low_bits() const
Get the low bits of the two&#39;s complement representation of the number.
Definition: decimal.h:105
+
Represents a signed 128-bit integer in two&#39;s complement.
Definition: decimal.h:39
+
uint64_t low_bits() const
Get the low bits of the two&#39;s complement representation of the number.
Definition: decimal.h:107