Fixes license text and other comments at the tops of files.
This commit is contained in:
76
BUILD
76
BUILD
@@ -1,3 +1,30 @@
|
||||
########################################################################################################################
|
||||
# #
|
||||
# @file BUILD #
|
||||
# #
|
||||
# @brief Defines build rules including tests for the top level utilities. #
|
||||
# @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com #
|
||||
# #
|
||||
# Licensed under the MIT license. See below for details. #
|
||||
# #
|
||||
# MIT License #
|
||||
# #
|
||||
# Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated #
|
||||
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the #
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to #
|
||||
# permit persons to whom the Software is furnished to do so, subject to the following conditions: #
|
||||
# #
|
||||
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the #
|
||||
# Software. #
|
||||
# #
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE #
|
||||
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS #
|
||||
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. #
|
||||
# #
|
||||
########################################################################################################################
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
||||
|
||||
package(
|
||||
@@ -20,6 +47,37 @@ cc_test(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "console_logger",
|
||||
srcs = ["console_logger.cpp"],
|
||||
hdrs = ["console_logger.h"],
|
||||
deps = [":logger"],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "console_logger_test",
|
||||
srcs = ["console_logger_test.cpp"],
|
||||
deps = [
|
||||
":console_logger",
|
||||
"@tinytest",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "logger",
|
||||
srcs = ["logger.cpp"],
|
||||
hdrs = ["logger.h"],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "logger_test",
|
||||
srcs = ["logger_test.cpp"],
|
||||
deps = [
|
||||
":logger",
|
||||
"@tinytest",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "pretty_print",
|
||||
srcs = ["pretty_print.cpp"],
|
||||
@@ -35,3 +93,21 @@ cc_test(
|
||||
"@tinytest",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "windows_logger",
|
||||
srcs = ["windows_logger.cpp"],
|
||||
hdrs = ["windows_logger.h"],
|
||||
target_compatible_with = ["@platforms//os:windows"],
|
||||
deps = [":logger"],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "windows_logger_test",
|
||||
srcs = ["windows_logger_test.cpp"],
|
||||
target_compatible_with = ["@platforms//os:windows"],
|
||||
deps = [
|
||||
":windows_logger",
|
||||
"@tinytest",
|
||||
],
|
||||
)
|
||||
|
||||
28
WORKSPACE
28
WORKSPACE
@@ -1,3 +1,31 @@
|
||||
########################################################################################################################
|
||||
# #
|
||||
# @file WORKSPACE #
|
||||
# #
|
||||
# @brief Defines external modules available to all BUILD files in this workspace. This also marks the root folder of #
|
||||
# the workspace #
|
||||
# @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com #
|
||||
# #
|
||||
# Licensed under the MIT license. See below for details. #
|
||||
# #
|
||||
# MIT License #
|
||||
# #
|
||||
# Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated #
|
||||
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the #
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to #
|
||||
# permit persons to whom the Software is furnished to do so, subject to the following conditions: #
|
||||
# #
|
||||
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the #
|
||||
# Software. #
|
||||
# #
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE #
|
||||
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS #
|
||||
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. #
|
||||
# #
|
||||
########################################################################################################################
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
# Hedron's Compile Commands Extractor for Bazel
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
/***************************************************************************************
|
||||
* @file ansi_escapes.cpp *
|
||||
* *
|
||||
* @brief Defines constants and functions for working with screen colors. *
|
||||
* @copyright *
|
||||
* Copyright 2023 Tom Hicks *
|
||||
* Licensed under the MIT license see the LICENSE file for details. *
|
||||
***************************************************************************************/
|
||||
/**********************************************************************************************************************
|
||||
* *
|
||||
* @file ansi_escapes.cpp *
|
||||
* *
|
||||
* @brief Defines constants and functions for working with screen colors. *
|
||||
* @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Licensed under the MIT license see below for details. *
|
||||
* *
|
||||
* MIT License *
|
||||
* *
|
||||
* Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated *
|
||||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation *
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and *
|
||||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of *
|
||||
* the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO *
|
||||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. *
|
||||
* *
|
||||
**********************************************************************************************************************/
|
||||
#include "ansi_escapes.h"
|
||||
|
||||
namespace CPPUtils {
|
||||
|
||||
@@ -1,13 +1,33 @@
|
||||
/**********************************************************************************************************************
|
||||
* *
|
||||
* @file ansi_escapes.h *
|
||||
* *
|
||||
* @brief Defines constants and functions for working with screen colors. *
|
||||
* @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Licensed under the MIT license see below for details. *
|
||||
* *
|
||||
* MIT License *
|
||||
* *
|
||||
* Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated *
|
||||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation *
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and *
|
||||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of *
|
||||
* the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO *
|
||||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. *
|
||||
* *
|
||||
**********************************************************************************************************************/
|
||||
#ifndef CPP_Utils__ansi_escapes_h__
|
||||
#define CPP_Utils__ansi_escapes_h__
|
||||
/***************************************************************************************
|
||||
* @file ansi_escapes.h *
|
||||
* *
|
||||
* @brief Defines constants and functions for working with screen colors. *
|
||||
* @copyright *
|
||||
* Copyright 2023 Tom Hicks *
|
||||
* Licensed under the MIT license see the LICENSE file for details. *
|
||||
***************************************************************************************/
|
||||
#include <cstdint>
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
/***************************************************************************************
|
||||
* @file ansi_escapes_test.cpp *
|
||||
* *
|
||||
* @brief Defines constants and functions for working with screen colors. *
|
||||
* @copyright *
|
||||
* Copyright 2023 Tom Hicks *
|
||||
* Licensed under the MIT license see the LICENSE file for details. *
|
||||
***************************************************************************************/
|
||||
/**********************************************************************************************************************
|
||||
* *
|
||||
* @file ansi_escapes_test.cpp *
|
||||
* *
|
||||
* @brief Defines constants and functions for working with screen colors. *
|
||||
* @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Licensed under the MIT license see below for details. *
|
||||
* *
|
||||
* MIT License *
|
||||
* *
|
||||
* Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated *
|
||||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation *
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and *
|
||||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of *
|
||||
* the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO *
|
||||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. *
|
||||
* *
|
||||
**********************************************************************************************************************/
|
||||
// clang-format off
|
||||
#include "ansi_escapes.h"
|
||||
#include "tinytest.h"
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
/***************************************************************************************
|
||||
* @file pretty_print.cpp *
|
||||
* *
|
||||
* @brief Defines functions for printing objects in a frendlier manner. *
|
||||
* @copyright *
|
||||
* Copyright 2023 Tom Hicks *
|
||||
* Licensed under the MIT license see the LICENSE file for details. *
|
||||
***************************************************************************************/
|
||||
/**********************************************************************************************************************
|
||||
* *
|
||||
* @file pretty_print.cpp *
|
||||
* *
|
||||
* @brief Defines functions for printing objects in a frendlier manner. *
|
||||
* @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Licensed under the MIT license see below for details. *
|
||||
* *
|
||||
* MIT License *
|
||||
* *
|
||||
* Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated *
|
||||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation *
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and *
|
||||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of *
|
||||
* the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO *
|
||||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. *
|
||||
* *
|
||||
**********************************************************************************************************************/
|
||||
#include "pretty_print.h"
|
||||
|
||||
namespace CPPUtils {
|
||||
|
||||
@@ -1,13 +1,35 @@
|
||||
/**********************************************************************************************************************
|
||||
* *
|
||||
* @file pretty_print.h *
|
||||
* *
|
||||
* @brief Declares function templates for printing objects in a friendlier manner. *
|
||||
* This specifically helps for printing stl containers, tuples, pairs, and queues as well as quoting strings *
|
||||
* contained within them. *
|
||||
* @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Licensed under the MIT license see below for details. *
|
||||
* *
|
||||
* MIT License *
|
||||
* *
|
||||
* Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated *
|
||||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation *
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and *
|
||||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of *
|
||||
* the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO *
|
||||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. *
|
||||
* *
|
||||
**********************************************************************************************************************/
|
||||
#ifndef CPP_UTILS_pretty_print_h__
|
||||
#define CPP_UTILS_pretty_print_h__
|
||||
/***************************************************************************************
|
||||
* @file pretty_print.cpp *
|
||||
* *
|
||||
* @brief Defines functions for printing objects in a frendlier manner. *
|
||||
* @copyright *
|
||||
* Copyright 2023 Tom Hicks *
|
||||
* Licensed under the MIT license see the LICENSE file for details. *
|
||||
***************************************************************************************/
|
||||
#include <initializer_list>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
|
||||
@@ -1,11 +1,31 @@
|
||||
/***************************************************************************************
|
||||
* @file pretty_print_test.cpp *
|
||||
* *
|
||||
* @brief Defines tests for functions for printing objects in a frendlier manner. *
|
||||
* @copyright *
|
||||
* Copyright 2023 Tom Hicks *
|
||||
* Licensed under the MIT license see the LICENSE file for details. *
|
||||
***************************************************************************************/
|
||||
/**********************************************************************************************************************
|
||||
* *
|
||||
* @file pretty_print_test.cpp *
|
||||
* *
|
||||
* @brief Defines test for the printing functions declared in pretty_print.h. *
|
||||
* @copyright Copyright (C) 2023 by Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Licensed under the MIT license see below for details. *
|
||||
* *
|
||||
* MIT License *
|
||||
* *
|
||||
* Copyright (c) 2023 Tom Hicks <headhunter3@gmail.com> *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated *
|
||||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation *
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and *
|
||||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of *
|
||||
* the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO *
|
||||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. *
|
||||
* *
|
||||
**********************************************************************************************************************/
|
||||
// clang-format off
|
||||
#include "pretty_print.h"
|
||||
#include "tinytest.h"
|
||||
|
||||
Reference in New Issue
Block a user