Visual Computing Library
Loading...
Searching...
No Matches
Miscellaneous

List of utility functions, classes and structs used in the library. More...

Concepts

concept  vcl::LoggerConcept
 The LoggerConcept is satisfied if the type T is a valid Logger type.
 

Classes

class  vcl::AbstractLogger
 The AbstractLogger class is used as common ancestor class for all the logger types in the library. More...
 
class  vcl::NullLogger
 The NullLogger class is used as default type in all the library functions that take as input a logger type. More...
 

Functions

template<Range R>
void vcl::shuffle (R &&range, bool deterministic=false)
 Shuffle the elements of a range.
 

Variables

NullLogger vcl::nullLogger
 The nullLogger object is an object of type NullLogger that is used as default argument in the functions that can take as input a logger.
 

Detailed Description

List of utility functions, classes and structs used in the library.

Function Documentation

◆ shuffle()

template<Range R>
void vcl::shuffle ( R &&  range,
bool  deterministic = false 
)

Shuffle the elements of a range.

Template Parameters
RType of the range.
Parameters
[in]rangeRange to shuffle.
[in]deterministicIf true, the shuffle will be deterministic.

Variable Documentation

◆ nullLogger

NullLogger vcl::nullLogger
inline

The nullLogger object is an object of type NullLogger that is used as default argument in the functions that can take as input a logger.

A typical function that could take a logger is defined as follows:

template<typename T, LoggerConcept LoggerType = NullLogger>
void foo(T obj, LoggerType log = nullLogger)
{
// code of the function...
// empty function will be called if the user does not give a logger
log.log("log!");
}
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
NullLogger nullLogger
The nullLogger object is an object of type NullLogger that is used as default argument in the functio...
Definition null_logger.h:125

In this way, when the user does not give a logger argument, the default will be an object of NullLogger.