cginternals / cppassist Goto Github PK
View Code? Open in Web Editor NEWC++ sanctuary for small but powerful and frequently required, stand alone features.
License: Other
C++ sanctuary for small but powerful and frequently required, stand alone features.
License: Other
Add loader for .glraw files (raw files with header). Should be similar to RawFile but include access to the key/value pairs in the header
The test case fails on macOS (https://travis-ci.org/cginternals/cppassist/jobs/195219351)
Currently, the FileLogHandler
opens the target file, writes the message and closes the file again for each log message, which is an unnecessary overhead.
Instead, the file should be opened once on construction and closed on destruction of the log handler. If it is desired to ensure that log messages are written to disk in case of a system crash, std::ostream::flush
should be used. This behavior could be configurable.
New name is fs
.
Wrap free functions of the following submodules into their own subnamespace of cppassist
.
string
into cppassist::string
io
into cppassist::io
(with #26, it is cppassist::fs
)Adjust code style consistently in all files (e.g., two lines between namespace and content).
The following compile errors occur inside the simd code on Apple LLVM version 8.0.0 (clang-800.0.42.1):
cppassist/source/cppassist/include/cppassist/simd/vector.inl:169:12: error
cannot initialize return object of type 'float *' with an rvalue of type 'const float *'
return data() + size();
static_assert failed "Allocator::value_type must be same type as value_type"
[...]
vector.h:28:36
Implement a cross-platform file watcher that works at least on Linux, Windows, and MacOS. It should be able to watch single files, and, if possible, directories and emit a callback when a file has changed.
Remove deprecated functionality that has already been replaced:
It should be possible to direct log messages to multiple log handlers simultaneously, e.g., console and file.
A simple implementation would be a log handler that forwards messages to a set of 'downstream' handlers.
Possible implementation:
template<typename EnumClass>
struct EnumClassHash
{
std::hash<unsigned char>::result_type operator()(
const EnumClass & arg) const
{
static std::hash<unsigned char> hasher;
return hasher(static_cast<unsigned char>(arg));
}
};
Possible usage:
template <>
struct hash<MyEnumClass> : EnumClassHash<MyEnumClass> {};
Similar to the integration in cppexpose:
3rdparty
directory to the root and register ConvertUTF as separate cmake target (https://github.com/cginternals/cppexpose/tree/2.0/3rdparty/linenoise-ng).cppassist/string/conversion
.Migrate functionality of FilePath
, directorytraversal
, and fs
to cppfs.
Migrate functionality of SystemInfo
to cpplocate.
The functionality for DescriptiveRawFile
and RawFile
(which includes readfile
) should remain in cppassist/fs
.
The current readme states wrong modules in cppassist with descriptions that are not up-to-date anymore.
This overload may get picked for just about any enum type if cppassist/Flags.h
is included in a compilation unit, even when it is not intended:
template <typename EnumType>
auto operator|(EnumType flag1, EnumType flag2) -> typename std::enable_if<std::is_enum<EnumType>::value, cppassist::Flags<EnumType>>::type;
One such instance would be this line from sstream
of the recent Visual Studio 15.8 update:
constexpr auto _Both = ios_base::in | ios_base::out;
Which fails to compile because cppassist::Flags
is not constexpr
. Cppassist should in no way be involved in this line buried deeply in the stdlib implementation.
Therefore I strongly suggest to remove this overload and the corresponding ones for operator&
and operator^
.
Decide on the name for this library. Either agree on cppassist or make alternative suggestions.
[==========] Running 40 tests from 5 test cases.
[----------] Global test environment set-up.
[----------] 7 tests from parallelFor_test
[ RUN ] parallelFor_test.ParellelIncrementVector
[ OK ] parallelFor_test.ParellelIncrementVector (6 ms)
[ RUN ] parallelFor_test.SequentialIncrementVector
[ OK ] parallelFor_test.SequentialIncrementVector (44 ms)
[ RUN ] parallelFor_test.ParellelSequentialEquality
[ OK ] parallelFor_test.ParellelSequentialEquality (52 ms)
[ RUN ] parallelFor_test.SizeTCompilation
[ OK ] parallelFor_test.SizeTCompilation (1 ms)
[ RUN ] parallelFor_test.Uint32Compilation
[ OK ] parallelFor_test.Uint32Compilation (1 ms)
[ RUN ] parallelFor_test.Uint64Compilation
[ OK ] parallelFor_test.Uint64Compilation (1 ms)
[ RUN ] parallelFor_test.UintCompilation
[ OK ] parallelFor_test.UintCompilation (1 ms)
[----------] 7 tests from parallelFor_test (109 ms total)
[----------] 3 tests from SystemInfo_test
[ RUN ] SystemInfo_test.pathSeperator
[ OK ] SystemInfo_test.pathSeperator (0 ms)
[ RUN ] SystemInfo_test.libPrefix
[ OK ] SystemInfo_test.libPrefix (0 ms)
[ RUN ] SystemInfo_test.libExtension
[ OK ] SystemInfo_test.libExtension (0 ms)
[----------] 3 tests from SystemInfo_test (2 ms total)
[----------] 9 tests from FilePath_test
[ RUN ] FilePath_test.originalPath
[ OK ] FilePath_test.originalPath (0 ms)
[ RUN ] FilePath_test.path
[ OK ] FilePath_test.path (1 ms)
[ RUN ] FilePath_test.setPath
[ OK ] FilePath_test.setPath (0 ms)
[ RUN ] FilePath_test.baseName
[ OK ] FilePath_test.baseName (1 ms)
[ RUN ] FilePath_test.fileName
[ OK ] FilePath_test.fileName (0 ms)
[ RUN ] FilePath_test.extension
[ OK ] FilePath_test.extension (0 ms)
[ RUN ] FilePath_test.directoryPath
[ OK ] FilePath_test.directoryPath (0 ms)
[ RUN ] FilePath_test.driveLetter
[ OK ] FilePath_test.driveLetter (0 ms)
[ RUN ] FilePath_test.directoryPathPlusFileName
[ OK ] FilePath_test.directoryPathPlusFileName (0 ms)
[----------] 9 tests from FilePath_test (15 ms total)
[----------] 7 tests from manipulation_test
[ RUN ] manipulation_test.join
[ OK ] manipulation_test.join (0 ms)
[ RUN ] manipulation_test.trim
[ OK ] manipulation_test.trim (4 ms)
[ RUN ] manipulation_test.parseArray
[ OK ] manipulation_test.parseArray (3 ms)
[ RUN ] manipulation_test.split
[ OK ] manipulation_test.split (0 ms)
[ RUN ] manipulation_test.contains
[ OK ] manipulation_test.contains (0 ms)
[ RUN ] manipulation_test.hasPrefix
[ OK ] manipulation_test.hasPrefix (0 ms)
[ RUN ] manipulation_test.hasSuffix
[ OK ] manipulation_test.hasSuffix (0 ms)
[----------] 7 tests from manipulation_test (17 ms total)
[----------] 14 tests from conversion_test
[ RUN ] conversion_test.fromString_char
[ OK ] conversion_test.fromString_char (0 ms)
[ RUN ] conversion_test.fromString_uchar
[ OK ] conversion_test.fromString_uchar (0 ms)
[ RUN ] conversion_test.fromString_int
[ OK ] conversion_test.fromString_int (0 ms)
[ RUN ] conversion_test.fromString_uint
[ OK ] conversion_test.fromString_uint (0 ms)
[ RUN ] conversion_test.fromString_float
[ OK ] conversion_test.fromString_float (0 ms)
[ RUN ] conversion_test.fromString_double
[ OK ] conversion_test.fromString_double (0 ms)
[ RUN ] conversion_test.fromString_bool
D:\projects\cppassist\source\tests\cppassist-test\conversion_test.cpp(121): error: Value of: val
Actual: true
Expected: false
[ FAILED ] conversion_test.fromString_bool (1 ms)
[ RUN ] conversion_test.toString_char
[ OK ] conversion_test.toString_char (0 ms)
[ RUN ] conversion_test.toString_uchar
[ OK ] conversion_test.toString_uchar (0 ms)
[ RUN ] conversion_test.toString_int
[ OK ] conversion_test.toString_int (0 ms)
[ RUN ] conversion_test.toString_uint
[ OK ] conversion_test.toString_uint (0 ms)
[ RUN ] conversion_test.toString_float
[ OK ] conversion_test.toString_float (0 ms)
[ RUN ] conversion_test.toString_double
[ OK ] conversion_test.toString_double (0 ms)
[ RUN ] conversion_test.toString_bool
D:\projects\cppassist\source\tests\cppassist-test\conversion_test.cpp(212): error: Value of: str
Actual: "true"
Expected: "1"
[ FAILED ] conversion_test.toString_bool (2 ms)
[----------] 14 tests from conversion_test (25 ms total)
[----------] Global test environment tear-down
[==========] 40 tests from 5 test cases ran. (176 ms total)
[ PASSED ] 38 tests.
[ FAILED ] 2 tests, listed below:
[ FAILED ] conversion_test.fromString_bool
[ FAILED ] conversion_test.toString_bool
2 FAILED TESTS
Visual Studio 2015 Update 3
I think the following list of classes from gloperate branch 0.9 can reside here:
AutoTimer
CachedValue
ChronoTimer
And the following classes of the master branch:
CyclicTime
collection
(already moved here?)make_unique
offsetof
ArgumentParser
.CommandLineProgram
to query the remaining arguments (in case no actions, switches, options or parameters are registered, this would return all arguments)If globjects is about to get the dependency to cppassist, the following classes can be moved here:
AbstractFunctionCall
/ FunctionCall
ChangeListener
/ Changeable
HeapOnly
Referenced
/ ref_ptr
Singleton
Additionally, the logging can get merged (AbstractLogHandler
, ConsoleLogger
, LogMessage
, LogMessageBuilder
, LogMessageLevel
, baselogging
, formatString
).
Maybe, the string source class hierarchy would remain in globjects but I wouldn't mind moving them here:
AbstractStringSource
CompositeStringSource
File
StaticStringSource
StringSourceDecorator
StringTemplate
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.