feat add #pragma once
This commit is contained in:
parent
6d52a8e8b0
commit
61bb10d443
@ -6,6 +6,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD_EXTENSIONS OFF)
|
||||
|
||||
option(SLED_BUILD_BENCHMARK "Build benchmark" OFF)
|
||||
option(SLED_BUILD_TESTS "Build tests" OFF)
|
||||
|
||||
set(BUILD_STATIC ON)
|
||||
set(BUILD_RTTR_DYNAMIC OFF)
|
||||
@ -61,3 +62,8 @@ if(SLED_BUILD_BENCHMARK)
|
||||
target_link_libraries(sled_benchmark PRIVATE sled benchmark::benchmark
|
||||
benchmark::benchmark_main)
|
||||
endif(SLED_BUILD_BENCHMARK)
|
||||
|
||||
if(SLED_BUILD_TESTS)
|
||||
find_package(gtest REQUIRED)
|
||||
add_executable(sled_tests "")
|
||||
endif(SLED_BUILD_TESTS)
|
||||
|
@ -21,8 +21,9 @@
|
||||
* (See accompanying file LICENSE.md or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef ANY_H
|
||||
#define ANY_H
|
||||
#pragma once
|
||||
#ifndef SLED_ANY_H
|
||||
#define SLED_ANY_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
@ -333,4 +334,4 @@ any_cast(any &&operand)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif /* ANY_H */
|
||||
#endif /* SLED_ANY_H */
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef BUFFER_H
|
||||
#define BUFFER_H
|
||||
#pragma once
|
||||
#ifndef SLED_BUFFER_H
|
||||
#define SLED_BUFFER_H
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
@ -275,4 +276,4 @@ using ZeroOnFreeBuffer = BufferT<T, true>;
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// BUFFER_H
|
||||
#endif// SLED_BUFFER_H
|
||||
|
@ -1,3 +1,6 @@
|
||||
#progam once
|
||||
#ifndef SLED_BYTE_ORDER_H
|
||||
#define SLED_BYTE_ORDER_H
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
@ -48,3 +51,5 @@ NetworkToHost32(uint32_t n)
|
||||
{
|
||||
return be32toh(n);
|
||||
}
|
||||
|
||||
#endif // SLED_BYTE_ORDER_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef CLEANUP_H
|
||||
#define CLEANUP_H
|
||||
#pragma once
|
||||
#ifndef SLED_CLEANUP_H
|
||||
#define SLED_CLEANUP_H
|
||||
|
||||
#include "sled/optional.h"
|
||||
|
||||
@ -64,4 +65,4 @@ MakeCleanup(Callback callback)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// CLEANUP_H
|
||||
#endif// SLED_CLEANUP_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef LOG_H
|
||||
#define LOG_H
|
||||
#pragma once
|
||||
#ifndef SLED_LOG_LOG_H
|
||||
#define SLED_LOG_LOG_H
|
||||
#include "sled/system/location.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
@ -98,4 +99,4 @@ void Log(LogLevel level,
|
||||
|
||||
#define ASSERT(cond, fmt, ...) SLOG_ASSERT(cond, "ASSERT", fmt, ##__VA_ARGS__)
|
||||
|
||||
#endif// LOG_H
|
||||
#endif// SLED_LOG_LOG_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef MAKE_REF_COUNTED_H
|
||||
#define MAKE_REF_COUNTED_H
|
||||
#pragma once
|
||||
#ifndef SLED_MAKE_REF_COUNTED_H
|
||||
#define SLED_MAKE_REF_COUNTED_H
|
||||
|
||||
#include "sled/ref_count.h"
|
||||
#include "sled/ref_counted_object.h"
|
||||
@ -73,4 +74,4 @@ make_ref_counted(Args &&...args)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// MAKE_REF_COUNTED_H
|
||||
#endif// SLED_MAKE_REF_COUNTED_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef ASYNC_RESOLVER_H
|
||||
#define ASYNC_RESOLVER_H
|
||||
#pragma once
|
||||
#ifndef SLED_NETWORK_ASYNC_RESOLVER_H
|
||||
#define SLED_NETWORK_ASYNC_RESOLVER_H
|
||||
|
||||
#include "sled/network/async_resolver_interface.h"
|
||||
#include "sled/scoped_refptr.h"
|
||||
@ -41,4 +42,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// ASYNC_RESOLVER_H
|
||||
#endif// SLED_NETWORK_ASYNC_RESOLVER_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef ASYNC_RESOLVER_INTERFACE_H
|
||||
#define ASYNC_RESOLVER_INTERFACE_H
|
||||
#pragma once
|
||||
#ifndef SLED_NETWORK_ASYNC_RESOLVER_INTERFACE_H
|
||||
#define SLED_NETWORK_ASYNC_RESOLVER_INTERFACE_H
|
||||
|
||||
#include "sled/network/socket_address.h"
|
||||
#include "sled/sigslot.h"
|
||||
@ -35,4 +36,4 @@ public:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// ASYNC_RESOLVER_INTERFACE_H
|
||||
#endif// SLED_NETWORK_ASYNC_RESOLVER_INTERFACE_H
|
||||
|
@ -4,8 +4,10 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef IP_ADDRESS_H
|
||||
#define IP_ADDRESS_H
|
||||
#pragma once
|
||||
|
||||
#ifndef SLED_NETWORK_IP_ADDRESS_H
|
||||
#define SLED_NETWORK_IP_ADDRESS_H
|
||||
|
||||
#include "sled/byte_order.h"
|
||||
#include <arpa/inet.h>
|
||||
@ -95,4 +97,4 @@ bool IPIsUnspec(const IPAddress &ip);
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// IP_ADDRESS_H
|
||||
#endif// SLED_NETWORK_IP_ADDRESS_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef NULL_SOCKET_SERVER_H
|
||||
#define NULL_SOCKET_SERVER_H
|
||||
#pragma once
|
||||
#ifndef SLED_NETWORK_NULL_SOCKET_SERVER_H
|
||||
#define SLED_NETWORK_NULL_SOCKET_SERVER_H
|
||||
|
||||
#include "sled/network/socket_server.h"
|
||||
#include "sled/synchronization/event.h"
|
||||
@ -26,4 +27,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// NULL_SOCKET_SERVER_H
|
||||
#endif// SLED_NETWORK_NULL_SOCKET_SERVER_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef PHYSICAL_SOCKET_SERVER_H
|
||||
#define PHYSICAL_SOCKET_SERVER_H
|
||||
#pragma once
|
||||
#ifndef SLED_NETWORK_PHYSICAL_SOCKET_SERVER_H
|
||||
#define SLED_NETWORK_PHYSICAL_SOCKET_SERVER_H
|
||||
|
||||
#include "sled/network/async_resolver.h"
|
||||
#include "sled/sigslot.h"
|
||||
@ -163,4 +164,4 @@ public:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// PHYSICAL_SOCKET_SERVER_H
|
||||
#endif// SLED_NETWORK_PHYSICAL_SOCKET_SERVER_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SOCKET_H
|
||||
#define SOCKET_H
|
||||
#pragma once
|
||||
#ifndef SLED_NETWORK_SOCKET_H
|
||||
#define SLED_NETWORK_SOCKET_H
|
||||
|
||||
#include "sled/network/socket_address.h"
|
||||
#include "sled/sigslot.h"
|
||||
@ -75,4 +76,4 @@ protected:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// SOCKET_H
|
||||
#endif// SLED_NETWORK_SOCKET_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SOCKET_ADDRESS_H
|
||||
#define SOCKET_ADDRESS_H
|
||||
#pragma once
|
||||
#ifndef SLED_NETWORK_SOCKET_ADDRESS_H
|
||||
#define SLED_NETWORK_SOCKET_ADDRESS_H
|
||||
|
||||
#include "sled/network/ip_address.h"
|
||||
|
||||
@ -68,4 +69,4 @@ bool SocketAddressFromSockAddrStorage(const sockaddr_storage &saddr,
|
||||
SocketAddress *out);
|
||||
}// namespace sled
|
||||
|
||||
#endif// SOCKET_ADDRESS_H
|
||||
#endif// SLED_NETWORK_SOCKET_ADDRESS_H
|
||||
|
@ -4,8 +4,10 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SOCKET_FACTORY_H
|
||||
#define SOCKET_FACTORY_H
|
||||
#pragma once
|
||||
|
||||
#ifndef SLED_NETWORK_SOCKET_FACTORY_H
|
||||
#define SLED_NETWORK_SOCKET_FACTORY_H
|
||||
|
||||
#include "sled/network/socket.h"
|
||||
|
||||
@ -19,4 +21,4 @@ public:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// SOCKET_FACTORY_H
|
||||
#endif// SLED_NETWORK_SOCKET_FACTORY_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SOCKET_SERVER_H
|
||||
#define SOCKET_SERVER_H
|
||||
#pragma
|
||||
#ifndef SLED_NETWORK_SOCKET_SERVER_H
|
||||
#define SLED_NETWORK_SOCKET_SERVER_H
|
||||
|
||||
#include "sled/network/socket_factory.h"
|
||||
#include "sled/units/time_delta.h"
|
||||
@ -30,4 +31,4 @@ std::unique_ptr<sled::SocketServer> CreateDefaultSocketServer();
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// SOCKET_SERVER_H
|
||||
#endif// SLED_NETWORK_SOCKET_SERVER_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef DIVIDE_ROUND_H
|
||||
#define DIVIDE_ROUND_H
|
||||
#pragma once
|
||||
#ifndef SLED_NUMERICS_DIVIDE_ROUND_H
|
||||
#define SLED_NUMERICS_DIVIDE_ROUND_H
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
@ -43,4 +44,4 @@ DivideRoundToNearst(Dividend dividend, Divisor divisor) -> decltype(Dividend() /
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// DIVIDE_ROUND_H
|
||||
#endif// SLED_NUMERICS_DIVIDE_ROUND_H
|
||||
|
@ -21,6 +21,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef FIXED_POINT_H_
|
||||
#define FIXED_POINT_H_
|
||||
#include <Eigen/Eigen>
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef OPERATIONS_CHAIN_H
|
||||
#define OPERATIONS_CHAIN_H
|
||||
#pragma once
|
||||
#ifndef SLED_OPERATIONS_CHAIN_H
|
||||
#define SLED_OPERATIONS_CHAIN_H
|
||||
|
||||
#include "sled/optional.h"
|
||||
#include "sled/ref_counted_base.h"
|
||||
@ -94,4 +95,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// OPERATIONS_CHAIN_H
|
||||
#endif// SLED_OPERATIONS_CHAIN_H
|
||||
|
@ -14,8 +14,9 @@
|
||||
// <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
///
|
||||
|
||||
#ifndef TL_OPTIONAL_HPP
|
||||
#define TL_OPTIONAL_HPP
|
||||
#pragma once
|
||||
#ifndef SLED_TL_OPTIONAL_HPP
|
||||
#define SLED_TL_OPTIONAL_HPP
|
||||
|
||||
#define TL_OPTIONAL_VERSION_MAJOR 1
|
||||
#define TL_OPTIONAL_VERSION_MINOR 1
|
||||
@ -2496,4 +2497,4 @@ struct hash<tl::optional<T>> {
|
||||
};
|
||||
}// namespace std
|
||||
|
||||
#endif
|
||||
#endif // SLED_TL_OPTIONAL_HPP
|
||||
|
@ -4,8 +4,8 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef CIRCLE_QUEUE_H
|
||||
#define CIRCLE_QUEUE_H
|
||||
#ifndef SLED_QUEUE_CIRCLE_QUEUE_H
|
||||
#define SLED_QUEUE_CIRCLE_QUEUE_H
|
||||
|
||||
#include "sled/log/log.h"
|
||||
#include <array>
|
||||
@ -66,4 +66,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// CIRCLE_QUEUE_H
|
||||
#endif// SLED_QUEUE_CIRCLE_QUEUE_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef RANDOM_H
|
||||
#define RANDOM_H
|
||||
#pragma once
|
||||
#ifndef SLED_RANDOM_H
|
||||
#define SLED_RANDOM_H
|
||||
|
||||
#include <limits>
|
||||
#include <stdint.h>
|
||||
@ -56,4 +57,4 @@ bool Random::Rand<bool>() const;
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// RANDOM_H
|
||||
#endif// SLED_RANDOM_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef REF_COUNT_H
|
||||
#define REF_COUNT_H
|
||||
#pragma once
|
||||
#ifndef SLED_REF_COUNT_H
|
||||
#define SLED_REF_COUNT_H
|
||||
|
||||
namespace sled {
|
||||
|
||||
@ -22,4 +23,4 @@ protected:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// REF_COUNT_H
|
||||
#endif// SLED_REF_COUNT_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef REF_COUNTED_BASE_H
|
||||
#define REF_COUNTED_BASE_H
|
||||
#pragma once
|
||||
#ifndef SLED_REF_COUNTED_BASE_H
|
||||
#define SLED_REF_COUNTED_BASE_H
|
||||
|
||||
#include "sled/ref_count.h"
|
||||
#include "sled/ref_counter.h"
|
||||
@ -68,4 +69,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// REF_COUNTED_BASE_H
|
||||
#endif// SLED_REF_COUNTED_BASE_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef REF_COUNTED_OBJECT_H
|
||||
#define REF_COUNTED_OBJECT_H
|
||||
#pragma once
|
||||
#ifndef SLED_REF_COUNTED_OBJECT_H
|
||||
#define SLED_REF_COUNTED_OBJECT_H
|
||||
|
||||
#include "sled/ref_count.h"
|
||||
#include "sled/ref_counter.h"
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef REF_COUNTER_H
|
||||
#define REF_COUNTER_H
|
||||
#pragma once
|
||||
#ifndef SLED_REF_COUNTER_H
|
||||
#define SLED_REF_COUNTER_H
|
||||
|
||||
#include "sled/ref_count.h"
|
||||
#include <atomic>
|
||||
@ -42,4 +43,4 @@ private:
|
||||
}// namespace sled_impl
|
||||
}// namespace sled
|
||||
|
||||
#endif// REF_COUNTER_H
|
||||
#endif// SLED_REF_COUNTER_H
|
||||
|
@ -4,6 +4,7 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#pragma
|
||||
#ifndef SLED_REFLECT_REFLECT_H
|
||||
#define SLED_REFLECT_REFLECT_H
|
||||
|
||||
@ -12,7 +13,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(__META_PARSER__)
|
||||
#define REFLECT_CLASS __attribute__((annotate("reflect-class")))
|
||||
#define CLASS(...) class __attribute__((annotate("reflect-class"))) #__VA_ARGS__
|
||||
#define PROPERTY() __attribute__((annotate("reflect-property")))
|
||||
#define METHOD() __attribute__((annotate("reflect-method")))
|
||||
#else
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SCOPED_REFPTR_H
|
||||
#define SCOPED_REFPTR_H
|
||||
#pragma once
|
||||
#ifndef SLED_SCOPED_REFPTR_H
|
||||
#define SLED_SCOPED_REFPTR_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -187,4 +188,4 @@ operator<(const scoped_refptr<T> &lhs, const scoped_refptr<U> &rhs)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// SCOPED_REFPTR_H
|
||||
#endif// SLED_SCOPED_REFPTR_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SEQUENCE_CHECKER_H
|
||||
#define SEQUENCE_CHECKER_H
|
||||
#pragma once
|
||||
#ifndef SLED_SEQUENCE_CHECKER_H
|
||||
#define SLED_SEQUENCE_CHECKER_H
|
||||
|
||||
namespace sled {
|
||||
|
||||
@ -21,4 +22,4 @@ public:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// SEQUENCE_CHECKER_H
|
||||
#endif// SLED_SEQUENCE_CHECKER_H
|
||||
|
@ -94,8 +94,9 @@
|
||||
// If signalx is single threaded the user must ensure that disconnect, connect
|
||||
// or signal is not happening concurrently or data race may occur.
|
||||
|
||||
#ifndef RTC_BASE_THIRD_PARTY_SIGSLOT_SIGSLOT_H_
|
||||
#define RTC_BASE_THIRD_PARTY_SIGSLOT_SIGSLOT_H_
|
||||
#pragma once
|
||||
#ifndef SLED_SIGSLOT_H
|
||||
#define SLED_SIGSLOT_H
|
||||
|
||||
#include <cstring>
|
||||
#include <list>
|
||||
@ -686,4 +687,4 @@ using signal8 =
|
||||
|
||||
}// namespace sigslot
|
||||
|
||||
#endif /* RTC_BASE_THIRD_PARTY_SIGSLOT_SIGSLOT_H_ */
|
||||
#endif // SLED_SIGSLOT_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef STATUS_H
|
||||
#define STATUS_H
|
||||
#pragma once
|
||||
#ifndef SLED_STATUS_H
|
||||
#define SLED_STATUS_H
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -108,4 +109,4 @@ std::ostream &operator<<(std::ostream &os, Status const &status);
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// STATUS_H
|
||||
#endif// SLED_STATUS_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef STATUS_OR_H
|
||||
#define STATUS_OR_H
|
||||
#pragma once
|
||||
#ifndef SLED_STATUS_OR_H
|
||||
#define SLED_STATUS_OR_H
|
||||
#include "sled/optional.h"
|
||||
#include "sled/status.h"
|
||||
#include <stdexcept>
|
||||
@ -161,4 +162,4 @@ make_status_or(StatusCode code, std::string message = "", ErrorInfo info = {})
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// STATUS_OR_H
|
||||
#endif// SLED_STATUS_OR_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef BASE64_H
|
||||
#define BASE64_H
|
||||
#pragma once
|
||||
#ifndef SLED_STRINGS_BASE64_H
|
||||
#define SLED_STRINGS_BASE64_H
|
||||
|
||||
#include "sled/status_or.h"
|
||||
#include <string>
|
||||
@ -20,4 +21,4 @@ public:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// BASE64_H
|
||||
#endif// SLED_STRINGS_BASE64_H
|
||||
|
10
include/sled/strings/utils.h
Normal file
10
include/sled/strings/utils.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef SLED_STRINGS_UTILS_H
|
||||
#define SLED_STRINGS_UTILS_H
|
||||
namespace sled {
|
||||
|
||||
std::string ToLower(const std::string &str);
|
||||
std::string ToUpper(const std::string &str);
|
||||
std::string ToHex(const std::string &str);
|
||||
|
||||
} // namespace sled
|
||||
#endif // SLED_STRINGS_UTILS_H
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef EVENT_H
|
||||
#define EVENT_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYNCHRONIZATION_EVENT_H
|
||||
#define SLED_SYNCHRONIZATION_EVENT_H
|
||||
|
||||
#include "sled/synchronization/mutex.h"
|
||||
#include "sled/units/time_delta.h"
|
||||
@ -40,4 +41,4 @@ public:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// EVENT_H
|
||||
#endif// SLED_SYNCHRONIZATION_EVENT_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef MUTEX_H
|
||||
#define MUTEX_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYNCHRONIZATION_MUTEX_H
|
||||
#define SLED_SYNCHRONIZATION_MUTEX_H
|
||||
|
||||
#include "sled/units/time_delta.h"
|
||||
#include <chrono>
|
||||
@ -159,4 +160,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// MUTEX_H
|
||||
#endif// SLED_SYNCHRONIZATION_MUTEX_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef ONE_TIME_EVENT_H
|
||||
#define ONE_TIME_EVENT_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYNCHRONIZATION_ONE_TIME_EVENT_H
|
||||
#define SLED_SYNCHRONIZATION_ONE_TIME_EVENT_H
|
||||
|
||||
#include "sled/synchronization/mutex.h"
|
||||
|
||||
@ -44,4 +45,4 @@ private:
|
||||
};
|
||||
}// namespace sled
|
||||
|
||||
#endif// ONE_TIME_EVENT_H
|
||||
#endif// SLED_SYNCHRONIZATION_ONE_TIME_EVENT_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SEQUENCE_CHECKER_INTERNAL_H
|
||||
#define SEQUENCE_CHECKER_INTERNAL_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYNCHRONIZATION_SEQUENCE_CHECKER_INTERNAL_H
|
||||
#define SLED_SYNCHRONIZATION_SEQUENCE_CHECKER_INTERNAL_H
|
||||
|
||||
#include "sled/synchronization/mutex.h"
|
||||
#include <string>
|
||||
@ -53,4 +54,4 @@ ExpectationToString(const ThreadLikeObject *checker)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// SEQUENCE_CHECKER_INTERNAL_H
|
||||
#endif// SLED_SYNCHRONIZATION_SEQUENCE_CHECKER_INTERNAL_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef THREAD_LOCAL_H
|
||||
#define THREAD_LOCAL_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYNCHRONIZATION_THREAD_LOCAL_H
|
||||
#define SLED_SYNCHRONIZATION_THREAD_LOCAL_H
|
||||
#include <cstddef>
|
||||
#include <thread>
|
||||
#include <type_traits>
|
||||
@ -92,4 +93,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// THREAD_LOCAL_H
|
||||
#endif// SLED_SYNCHRONIZATION_THREAD_LOCAL_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef LOCATION_H
|
||||
#define LOCATION_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYSTEM_LOCATION_H
|
||||
#define SLED_SYSTEM_LOCATION_H
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -33,4 +34,4 @@ private:
|
||||
|
||||
#define SLED_FROM_HERE sled::Location::Current();
|
||||
|
||||
#endif// LOCATION_H
|
||||
#endif// SLED_SYSTEM_LOCATION_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef THREAD_H
|
||||
#define THREAD_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYSTEM_THREAD_H
|
||||
#define SLED_SYSTEM_THREAD_H
|
||||
#include "sled/synchronization/mutex.h"
|
||||
#include "sled/synchronization/thread_local.h"
|
||||
#include "sled/task_queue/task_queue_base.h"
|
||||
@ -188,4 +189,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// THREAD_H
|
||||
#endif// SLED_SYSTEM_THREAD_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef SYSTEM_TIME_H
|
||||
#define SYSTEM_TIME_H
|
||||
#pragma once
|
||||
#ifndef SLED_SYSTEM_TIME_H
|
||||
#define SLED_SYSTEM_TIME_H
|
||||
#include <cstdint>
|
||||
|
||||
namespace sled {
|
||||
@ -14,4 +15,4 @@ int64_t SystemTimeNanos();
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// SYSTEM_TIME_H
|
||||
#endif// SLED_SYSTEM_TIME_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef PENDING_TASK_SAFETY_FLAG_H
|
||||
#define PENDING_TASK_SAFETY_FLAG_H
|
||||
#pragma once
|
||||
#ifndef SLED_TASK_QUEUE_PENDING_TASK_SAFETY_FLAG_H
|
||||
#define SLED_TASK_QUEUE_PENDING_TASK_SAFETY_FLAG_H
|
||||
|
||||
#include "sled/ref_counted_base.h"
|
||||
#include "sled/scoped_refptr.h"
|
||||
@ -35,4 +36,4 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// PENDING_TASK_SAFETY_FLAG_H
|
||||
#endif// SLED_TASK_QUEUE_PENDING_TASK_SAFETY_FLAG_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef TASK_QUEUE_BASE_H
|
||||
#define TASK_QUEUE_BASE_H
|
||||
#pragma once
|
||||
#ifndef SLED_TASK_QUEUE_TASK_QUEUE_BASE_H
|
||||
#define SLED_TASK_QUEUE_TASK_QUEUE_BASE_H
|
||||
|
||||
#include "sled/system/location.h"
|
||||
#include "sled/units/time_delta.h"
|
||||
@ -91,4 +92,4 @@ protected:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// TASK_QUEUE_BASE_H
|
||||
#endif// SLED_TASK_QUEUE_TASK_QUEUE_BASE_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef TIME_UNITS_H
|
||||
#define TIME_UNITS_H
|
||||
#pragma once
|
||||
#ifndef SLED_TIME_UNITS_H
|
||||
#define SLED_TIME_UNITS_H
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
@ -80,4 +81,4 @@ int64_t TimeUTCNanos();
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// TIME_UNITS_H
|
||||
#endif// SLED_TIME_UNITS_H
|
||||
|
@ -3,9 +3,10 @@
|
||||
* @created : Saturday Feb 03, 2024 10:31:29 CST
|
||||
* @license : MIT
|
||||
**/
|
||||
#pragma once
|
||||
|
||||
#ifndef TIME_DELTA_H
|
||||
#define TIME_DELTA_H
|
||||
#ifndef SLED_UNITS_TIME_DELTA_H
|
||||
#define SLED_UNITS_TIME_DELTA_H
|
||||
|
||||
#include "sled/units/unit_base.h"
|
||||
#include <string>
|
||||
@ -104,4 +105,4 @@ operator<<(std::ostream &stream, TimeDelta value)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// TIME_DELTA_H
|
||||
#endif// SLED_UNITS_TIME_DELTA_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef TIMESTAMP_H
|
||||
#define TIMESTAMP_H
|
||||
#progma once
|
||||
#ifndef SLED_UNITS_TIMESTAMP_H
|
||||
#define SLED_UNITS_TIMESTAMP_H
|
||||
#include "sled/units/time_delta.h"
|
||||
#include "sled/units/unit_base.h"
|
||||
|
||||
@ -147,4 +148,4 @@ operator<<(std::ostream &stream, Timestamp value)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// TIMESTAMP_H
|
||||
#endif// SLED_UNITS_TIMESTAMP_H
|
||||
|
@ -4,8 +4,9 @@
|
||||
* @license : MIT
|
||||
**/
|
||||
|
||||
#ifndef UNIT_BASE_H
|
||||
#define UNIT_BASE_H
|
||||
#pragma once
|
||||
#ifndef SLED_UNITS_UNIT_BASE_H
|
||||
#define SLED_UNITS_UNIT_BASE_H
|
||||
|
||||
#include "sled/numerics/divide_round.h"
|
||||
#include <algorithm>
|
||||
@ -311,4 +312,4 @@ operator-(RelativeUnit<Unit_T> other)
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// UNIT_BASE_H
|
||||
#endif// SLED_UNITS_UNIT_BASE_H
|
||||
|
@ -5,8 +5,9 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef MPARK_VARIANT_HPP
|
||||
#define MPARK_VARIANT_HPP
|
||||
#pragma once
|
||||
#ifndef SLED_MPARK_VARIANT_HPP
|
||||
#define SLED_MPARK_VARIANT_HPP
|
||||
|
||||
/*
|
||||
variant synopsis
|
||||
@ -3038,4 +3039,4 @@ using namespace mpark;
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#endif// MPARK_VARIANT_HPP
|
||||
#endif// SLED_MPARK_VARIANT_HPP
|
||||
|
Loading…
x
Reference in New Issue
Block a user