churchianity
96a7636db7
|
1 year ago | |
---|---|---|
README.md | 1 year ago | |
alloc.cpp | 1 year ago | |
alloc.h | 1 year ago | |
array.hpp | 1 year ago | |
clipboard-osx.mm | 1 year ago | |
clipboard-win.cpp | 1 year ago | |
clipboard.cpp | 1 year ago | |
clipboard.h | 1 year ago | |
config.h | 1 year ago | |
cpuid.cpp | 1 year ago | |
cpuid.h | 1 year ago | |
file.cpp | 1 year ago | |
file.h | 1 year ago | |
print.cpp | 1 year ago | |
print.h | 1 year ago | |
serialize.cpp | 1 year ago | |
serialize.h | 1 year ago | |
signal-handler.h | 1 year ago | |
sse_mathfun.h | 1 year ago | |
string.h | 1 year ago | |
table.hpp | 1 year ago | |
types.h | 1 year ago | |
util.h | 1 year ago |
README.md
This is a library of C++ code which I use as a standard library wrapper, supplement, and in some cases, replacement.
If you want to use it, you can add all of the source files to your source tree, configure the #define
's in config.h
to suit your needs, and it should just work.
Features:
-
Stack, Scratch, and Block-based allocators as well as memory-leak checking mechanism and OS allocator wrappers in
alloc.h/.cpp
-
Heap-friendly String type, including format strings and StringBuffers/Builders, as well as
<string.h>
function replacements as static methods in single-headerstring.h
-
Instrusive serialization mechanism in
serialize.h/.cpp
for complex types and primitives (no reflection though) -
A few hash functions, HashTable and CacheTable (hash table that can forget its keys) implementations in
table.hpp
-
A dynamic/growing array implementation in
array.hpp
-
Common file operations,
<stdio>
wrapper infile.h/.cpp
-
Process signal handlers in
signal-handler.h
(define what happens when your process gets sent a SIGINT signal, etc) -
stdout
/ printf wrapper inprint.h/.cpp
for programmer ergonomics + making it so if you#include <stdio.h>
in your program, it will be just in these files.
And some more stuff that is TODO:
-
cpuid
x86 instruction wrapper -
glm
replacement - vector, matrix, and quaternion types and some common operations involving them
Licenses & Other Code
fast_float
Our serialization code uses fast_float
library by Daniel Lemire et al, provided simultaneously under the Apache License, Version 2.0, the MIT license and/or the BOOST license. The fast_float
library itself uses code originally published the Apache 2.0 license.
sse_mathfun.h
The sin
, cos
, exp
, and log
replacements used by this library are provided by a single-header library written by Julien Pommier under the zlib license:
Copyright (C) 2007 Julien Pommier
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
(this is the zlib license)