Releases: libyuni/libyuni
v1.1.1
v1.1.0
License
IMPORTANT NOTICE: libyuni is now under the MPL2 license
(Mozilla Public License, version 2.0), instead of LGPL, to remove any licensing ambiguities.
New
-
{core} {event} added
fold
method for callback result foldingEvent<uint ()> evt; evt.connect([]() -> uint { return 10u; }); evt.connect([]() -> uint { return 4u; }); std::cout << evt.fold(0u, Lambda::Add<uint>()) << std::endl; // 14
-
{core} Functional: Support for collection Views with fold, filter, map
and many pre-defined binary operations for folding. -
{core} String: added operator overloads for easier UTF8::Char / multi-byte
string comparisons. -
{core} String: now accepts wide strings
-
{core} added
Yuni::WString
, a lightweight helper for manipulating wide strings -
{core} added
Yuni::HashCombine
(yuni/core/stl/hash-combine.h
) to easily
compute the the hash of complex structs. -
{core} added
Yuni::deleteAndNull
anddeleteArrayAndNull
, to delete an object
and set the underlying variable to null in one call -
{core} added
Yuni::Math::RoundUp
, for rounding up to the nearest multiple of a number -
{core} added
Yuni::NonMovable
-
{core} added
Yuni::System::Environment::ReadAsBool
andYuni::System::Environment::ReadAsInt64
Those functions can be useful for performance reasons (avoids memory allocations whever it
is possible), where the string value is not required -
{io} added
Yuni::IO::FetchFileStatus()
, to retrieve in one call the type,
the size and the timestamp of the last modifcation of a filename -
{jobs} added
Yuni::Job::Taskgroup
, for easily handling groups of jobs -
{jobs} added the method
gracefulStop()
to the queue service to ask
it to stop as soon as possible. The big advantage to this method is it
can be called from any threads, unlikestop()
which may create a
deadlock if called from a job. -
{jobs} added the method
clear()
to the queue service to remove all jobs
waiting to be executed -
{parser} JSON export
-
{sample} {parser} added json parser
-
{core} The warning '-Wsitch' on gcc/clang (enumeration value not handled in switch) is now an error.
For legacy programs, thedefault
clause can be added where appropriate.
Changes
- {core}
Yuni::Process
has been renamedYuni::Process::Program
. - {core}
Yuni::Process
do no longer automatically redirect the output
of the subprocess to the standard output of the parent process.
The methodYuni::Process::Program::redirectToConsole(bool)
can be use to
modify this behavior. - {core} Fold : Renamed
Yuni::Functional::Fold
toYuni::fold
. - {core} String: both the methods
String::format()
andString::appendFormat()
now useconst char* format
instead ofconst AnyString& format
.
Reason: 'va_start' has undefined behavior with reference types. You
can useString::c_str()
if old code were using Yuni::String as input format. - {core} Jobs: The method
wait
of the queue service now requires an event
to distinguish the different use-cases. UsesqseIdle
to wait for all jobs
being executed (this value should represent the old behavior ofwait
)
or useqseStop
to wait for the queue service being stopped (by
stop()
orgracefulStop()
). - {core}
String::words
: empty elements are now kept by default, as it was stated
in the documentation. - {core} Updated the list of Microsoft Security Development Lifecycle (SDL) banned APIs
- {io}
IO::NodeType
has new possible values to better match UNIX characteristics:
typeSymLink
,typeSocket
andtypeSpecial
- {io}
IO::TypeOf()
now accepts an optional parameterfollowSymLink
- {jobs} Overall Performance Improvement
- {jobs}
Yuni::Job::QueueService
now uses an intrusive smartptr - {dbi} upgraded to sqlite 3.9.1
Fixes
- {core} Detection of the clang compiler when CMAKE_CXX_COMPILER is not used
- [core] Fixed return value of Yuni::String::replace(char, char) which always returned 0
(instead of the number of replaced characters as expected)
Deprecated
- {vm} This module is now deprecated and will be removed in future releases
v1.0.2
Changes
-
{core} String: the method
String::format()
andString::appendFormat()
now useconst char* format
instead ofconst AnyString& format
.
Reason: 'va_start' has undefined behavior with reference types. You
can useString::c_str()
if old code were using Yuni::String as input format.This patch breaks ABI compatibility for the branch 1.0.x, but since it would
lead to undefined behavior, it has been backported from v1.1.
Fixes
- {core} Fixed compilation with clang 3.5
v1.0.1
v1.0.0
New
-
{core} Multihreading:
- Introduced new convenient utility routines for Multithreading Programming:
spawn
,every
,async
andsync
(seeyuni/thread/utility.h
for more details) Yuni::IThread
is now able to set the internal thread stack size via a parameter
from its constructor, mainly to reduce memory consumption when a lot of threads are involved.
The default value has been set to 512K, which should be large enough for most scenarios.
- Introduced new convenient utility routines for Multithreading Programming:
-
{core} C++11/14 support enhancement:
- `Yuni::Bind` now supports C++11 lambda - `Yuni::String` now supports move semantic - Multiple fixes related to C++11/14 standards
-
{core}
Yuni::SmartPtr
is now able to detect if an ownership policy does not seem appropriate
(see changes about intrusive smart pointers - COMReferenceCounted policy) -
{core} An helper class is now available to detect at compile time if a specific typedef
is available within a given class and his ancestors (seeyuni/core/static/typedef.h
) -
{core}
System::Console
: new routinesIsStdoutTTY()
andIsStderrTTY()
to determine
whether the standard output (or standard error output) is a TTY or not -
{core} added new class Yuni::Tribool, a 3-state boolean
-
{core} added typedefs
float32
,float64
-
{core} Bind: added method
empty()
andoperator !
to determine if an object is binded -
{core/functional} added
Functional::Fold()
routine -
{dbi} The DBI/sqlite adapter is now ready for production
-
{io}
Yuni::IO::LoadFromFile
now accepts std::string as a destination
Changes
- {core} Smart pointers:
IIntrusiveSmartPtr<T>
now uses a non recursive mutex.Yuni::SmartPtr
won't compile when using the COMReferenceCounted ownership policy
(intrusive smart ptr, the reference counter is inside the object) if the
underlying object does not have the required methods (addRef
,release
, and
hasIntrusiveSmartPtr
) The abstract classIIntrusiveSmartPtr
should be used for
implementing intrusive smart pointer.
- The method
SmartPtr::unique()
has been removed due to thread-safety issues IIntrusiveSmartPtr::onRelease
is now const.
- {core} Jobs:
Yuni::Job::IJob
andYuni::Thread::IThread
now use intrusive smartptr
to reduce memory allocation in high workload environments. Consequently it may not compile
for some old program. UseIJob::Ptr::Promote<T>::Ptr
orThread::IThread::Ptr::Promote<T>::Ptr
to get the appropriate smartptr type.<yuni/job/queue/queue.h>
has been remamed to<yuni/job/queue/service.h>
for consistency<yuni/job/queue.h>
has been removed. Please use<yuni/job/queue/service.h>
insteadYuni::Job::QueueService
is no longer a template class and has been
internally revamped
- {core} Variants:
- The variant's types have been renamed (
Yuni::Variant::tString
is nowYuni::variantTString
)
- The variant's types have been renamed (
- {core} Math/Geometry:
- the methods
Point2D::closeTo()
have been renamed toPoint2D::isCloseTo()
- the methods
Point3D::closeTo()
have been renamed toPoint3D::isCloseTo()
- the methods
- {core} Misc: msinttypes for Visual Studio has been updated to r29 (http://code.google.com/p/msinttypes/)
- {core} Event::Loop: added the method
gracefulStop()
- {core} Point2D and Point3D : Added operator * and *=.
- {core} String : added an optional boolean to
words()
to keep empty lines - {dbi} Updated sqlite to v3.8.3
- {gl} Updated glew to v1.10
Fixes
- {core} Fixed Clang compiler detection
- {core} Fixed compilation on Visual Studio 2013
- {core}
Yuni::Timer
: Fixed a potential race condition - {core} Math/Geometry : added missing
operator**{}** const
forPoint2D
,Point3D
, andVector3D
. - {core} Fixed the method
Yuni::String::split()
with list or vector ofAnyString
,
which was producing unpredictable results (ex: callingString("1,2,3").split(mylist, ",")
withmylist
asAnyString::Vector
) - {core} Fixed the method
IO::Directory::Info::clean()
, which was only deleting subfolders - {core} removed overload on std::vector/std::list with std::ostream
- {core} #462: string: fixes implicit cast to bool when assigning an int from the constructor
- {core}
Yuni::String
: istartsWith was not case-insensitive - {core} #351, #358: System::Environment::Read now handle Unicode value on Windows
- {core} #463: Bind: fixed invalid pointer when unbinding (VS2013)
- {io} Fixed directory and file iterators when given a path containing mixed slashes and backslashes.