aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Loading...
Searching...
No Matches
BigInteger.h
Go to the documentation of this file.
1#pragma once
6#include <aws/crt/Exports.h>
7#include <aws/crt/Types.h>
8
9#include <aws/common/bignum.h>
10
11#include <memory>
12
13namespace Aws
14{
15 namespace Crt
16 {
23 {
24 public:
25 BigInteger() noexcept;
26 explicit BigInteger(Allocator *allocator) noexcept;
27
29 explicit BigInteger(aws_big_integer *value) noexcept : m_value(value, aws_big_integer_destroy) {}
31 const aws_big_integer *GetUnderlyingHandle() const noexcept { return m_value.get(); }
32
33 static Optional<BigInteger> FromString(ByteCursor str, Allocator *allocator = ApiAllocator()) noexcept;
34
35 String ToString() const noexcept;
36
37 bool operator==(const BigInteger &other) const noexcept;
38 bool operator!=(const BigInteger &other) const noexcept;
39
40 private:
41 std::shared_ptr<aws_big_integer> m_value;
42 };
43 } // namespace Crt
44} // namespace Aws
#define AWS_CRT_CPP_API
Definition Exports.h:36
Definition BigInteger.h:23
Definition Optional.h:19
aws_byte_cursor ByteCursor
Definition Types.h:31
aws_allocator Allocator
Definition Allocator.h:14
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition Allocator.cpp:24
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition Types.h:45
bool operator==(const basic_string_view< CharT, Traits > &lhs, const basic_string_view< CharT, Traits > &rhs) noexcept
Definition StringView.h:666
bool operator!=(const basic_string_view< CharT, Traits > &lhs, const basic_string_view< CharT, Traits > &rhs) noexcept
Definition StringView.h:691
Definition Allocator.h:11