-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Samuel-Tyler/devel
Significant Compilation Improvements
- Loading branch information
Showing
40 changed files
with
11,278 additions
and
7,434 deletions.
There are no files selected for viewing
Submodule abseil-cpp
updated
784 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/ber_types/choice.hpp" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/ber_types/GeneralizedTime.hpp" | ||
namespace fast_ber | ||
{ | ||
|
||
class Date | ||
{ | ||
}; | ||
using Date = GeneralizedTime; | ||
|
||
} // namespace fast_ber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/ber_types/GeneralizedTime.hpp" | ||
namespace fast_ber | ||
{ | ||
|
||
using DateTime = GeneralizedTime; | ||
|
||
} // namespace fast_ber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/ber_types/GeneralizedTime.hpp" | ||
namespace fast_ber | ||
{ | ||
|
||
using Duration = GeneralizedTime; | ||
|
||
} // namespace fast_ber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/util/BerView.hpp" | ||
#include "fast_ber/util/EncodeHelpers.hpp" | ||
|
||
namespace fast_ber | ||
{ | ||
|
||
class Real | ||
{ | ||
public: | ||
Real() noexcept : m_data{} {} | ||
Real(double num) noexcept { assign(num); } | ||
Real(BerView& view) noexcept { assign_ber(view); } | ||
|
||
explicit Real(absl::Span<const uint8_t> ber_data) noexcept { assign_ber(ber_data); } | ||
|
||
// Implicit conversion to double | ||
operator double() const noexcept { return value(); } | ||
double value() const noexcept; | ||
|
||
Real& operator=(double rhs) noexcept; | ||
Real& operator=(const Real& rhs) noexcept; | ||
Real& operator=(const BerView& rhs) noexcept; | ||
void assign(double val) noexcept; | ||
void assign(const Real& rhs) noexcept; | ||
size_t assign_ber(const BerView& rhs) noexcept; | ||
size_t assign_ber(absl::Span<const uint8_t> buffer) noexcept; | ||
|
||
bool operator==(const Real&) const | ||
{ | ||
// TODO: fuzzy equality here | ||
return true; | ||
} | ||
bool operator!=(const Real& rhs) const { return !(*this == rhs); } | ||
|
||
EncodeResult encode_content_and_length(absl::Span<uint8_t> buffer) const noexcept; | ||
|
||
private: | ||
void set_content_length(uint64_t length) noexcept | ||
{ | ||
assert(length <= std::numeric_limits<uint8_t>::max()); | ||
m_data[0] = static_cast<uint8_t>(length); | ||
} | ||
uint8_t content_length() const noexcept { return m_data[0]; } | ||
size_t encoded_length() const noexcept { return 1 + content_length(); } | ||
|
||
std::array<uint8_t, sizeof(int64_t) + sizeof(uint8_t)> m_data; | ||
}; | ||
|
||
constexpr inline ExplicitIdentifier<UniversalTag::real> identifier(const Real*) noexcept { return {}; } | ||
} // namespace fast_ber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/ber_types/GeneralizedTime.hpp" | ||
namespace fast_ber | ||
{ | ||
class Time | ||
{ | ||
}; | ||
|
||
using Time = GeneralizedTime; | ||
|
||
} // namespace fast_ber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/ber_types/GeneralizedTime.hpp" | ||
namespace fast_ber | ||
{ | ||
class TimeOfDay | ||
{ | ||
}; | ||
|
||
using TimeOfDay = GeneralizedTime; | ||
|
||
} // namespace fast_ber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#pragma once | ||
|
||
#include "fast_ber/ber_types/GeneralizedTime.hpp" | ||
namespace fast_ber | ||
{ | ||
class UTCTime | ||
{ | ||
}; | ||
|
||
using UTCTime = GeneralizedTime; | ||
|
||
} // namespace fast_ber |
Oops, something went wrong.