ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
debugtools.hpp
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16#ifndef DEBUGTOOLS_HPP
17#define DEBUGTOOLS_HPP
18
19#include <array>
20#include <string>
21
22namespace clockwerk {
23
24 /// @brief Debug function to print an array
25 /// @param val The array to print
26 /// @return String representing the array
27 template <typename T, long unsigned int N>
28 std::string printArray(const std::array<T, N> &val) {
29 std::string pval = "[";
30 for(unsigned int i = 0; i < N; i++) {
31 pval += std::to_string(val[i]);
32 if(i < N - 1) {
33 pval += " ";
34 }
35 }
36 pval += "]";
37
38 return pval;
39 }
40
41}
42
43#endif