Git Product home page Git Product logo

cppassist's People

Contributors

cgcostume avatar jopyth avatar julkw avatar sbusch42 avatar scheibel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cppassist's Issues

Adjust code style

Adjust code style consistently in all files (e.g., two lines between namespace and content).

Logging to multiple LogHandlers

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.

File system watcher

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.

Update README.md

The current readme states wrong modules in cppassist with descriptions that are not up-to-date anymore.

Provide generic hasher for enum classes

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> {};

Flag operators intefere with other libraries

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^.

Review cmdline module

  • Remove ArgumentParser.
  • Provide interface on CommandLineProgram to query the remaining arguments (in case no actions, switches, options or parameters are registered, this would return all arguments)
  • Allow for nesting actions (presumably merge action and program or subclass program from action)

Move classes from globjects

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

File loader for .glraw files

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

Move classes from gloperate

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

Bool conversion tests fail

[==========] 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

FileLogHandler should open file only once

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.

Library name

Decide on the name for this library. Either agree on cppassist or make alternative suggestions.

Cleanup fs module

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.

Compile errors on apple clang

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.