TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
C++ language

C++ language features and design patterns. More...

Collaboration diagram for C++ language:

Files

file  tsAfterStandardHeaders.h
 Technical header to include after including standard and system headers.
 
file  tsAlgorithm.h
 Miscellaneous C++ algorithms supplementing the standard <algorithm>.
 
file  tsBCD.h
 Binary Coded Decimal utilities.
 
file  tsBeforeStandardHeaders.h
 Technical header to include before including standard and system headers.
 
file  tsEnumUtils.h
 Some utilities on enumeration types.
 
file  tsFatal.h
 Handle some fatal situations.
 
file  tsFloatUtils.h
 Some utilities on floating point types.
 
file  tsFunctors.h
 Miscellaneous C++ general-purpose functors.
 
file  tsIntegerUtils.h
 Some utilities on integers.
 
file  tsMemory.h
 Utility routines for memory operations.
 
file  tsPlatform.h
 Cross-platforms portable base definitions for the TSDuck project.
 
file  tsUChar.h
 Unicode characters.
 

Classes

class  ts::AbstractNumber
 Abstract base class for different representations of "numbers". More...
 
class  ts::AbstractOutputStream
 Intermediate abstract class to help implementing std::ostream. More...
 
class  ts::ArgMix
 Base class for elements of an argument list with mixed types. More...
 
class  ts::ArgMixIn
 Define an element of an argument list with mixed integer and string input types. More...
 
class  ts::ArgMixOut
 Define an element of an argument list with integer output types of mixed sizes. More...
 
class  ts::Buffer
 General-purpose memory buffer with bit access. More...
 
class  ts::ByteBlock
 Definition of a generic block of bytes. More...
 
class  ts::CompactBitSet< BITS >
 A compact version of std::bitset. More...
 
class  ts::DisplayInterface
 An interface to be implemented by classes supporting display to a standard text stream. More...
 
class  ts::Enumeration
 Enumeration of int/string pairs. More...
 
class  ts::Exception
 Base class for all exceptions in TSDuck. More...
 
class  ts::Expressions
 Expression resolver based on the definition of symbols. More...
 
class  ts::FixedPoint< INT_T, PREC >
 Template representation of fixed-precision numbers. More...
 
class  ts::FloatingPoint< FLOAT_T, PREC >
 Encapsulation of a double floating-point as an AbstractNumber. More...
 
class  ts::Fraction< INT_T >
 Template representation of fractional numbers. More...
 
class  ts::Grid
 This class produces a report in a grid format with tables and sections. More...
 
class  ts::ImplementationError
 Implementation error. More...
 
class  ts::Integer< INT_T >
 Encapsulation of an integer type as an AbstractNumber. More...
 
class  ts::IntegerMap< KEY, VALUE, KEYNAMESECTION, NAMESFILE >
 Generic map of integers, indexed by integer. More...
 
class  ts::Object
 General-purpose base class for polymophic objects. More...
 
class  ts::ObjectRepository
 A global repository of general-purpose base class for polymophic objects. More...
 
class  ts::RingNode
 Base class for objects being part of a ring, ie. More...
 
class  ts::SingleDataStatistics< NUMBER, DEFAULT_FLOAT, class >
 Statistics over a single set of data (integer or floating point). More...
 
class  ts::StringifyInterface
 An interface to be implemented by classes supporting a conversion to UString. More...
 
class  ts::TextFormatter
 Format and print a text document using various output types and indentation. More...
 
class  ts::TextParser
 A support class for applications which parse various text formats. More...
 
class  ts::TextTable
 This class produces a formatted table of text lines and columns. More...
 
class  ts::UID
 A singleton which generates 64-bit UID, unique integer. More...
 
class  ts::UString
 An implementation of UTF-16 strings. More...
 

Typedefs

using ts::BoolPredicate = bool(*)(bool, bool)
 Declaration of a boolean predicate with two arguments.
 
using ts::MonoBoolPredicate = bool(*)(bool)
 Declaration of a boolean predicate with one argument.
 
using ts::MultiBoolPredicate = bool(*)(std::initializer_list< bool >)
 Declaration of a boolean predicate with a variable number of arguments.
 

Functions

bool ts::And (bool arg1, bool arg2)
 BoolPredicate "and".
 
bool ts::Identity (bool arg)
 MonoBoolPredicate identity.
 
bool ts::MultiAnd (std::initializer_list< bool > args)
 MultiBoolPredicate "and".
 
bool ts::MultiNand (std::initializer_list< bool > args)
 MultiBoolPredicate "nand".
 
bool ts::MultiNor (std::initializer_list< bool > args)
 MultiBoolPredicate "nor".
 
bool ts::MultiOr (std::initializer_list< bool > args)
 MultiBoolPredicate "or".
 
bool ts::Nand (bool arg1, bool arg2)
 BoolPredicate "nand".
 
bool ts::Nor (bool arg1, bool arg2)
 BoolPredicate "nor".
 
bool ts::Not (bool arg)
 MonoBoolPredicate "not".
 
bool ts::Or (bool arg1, bool arg2)
 BoolPredicate "or".
 
bool ts::Xor (bool arg1, bool arg2)
 BoolPredicate "exclusive or".
 

Detailed Description

C++ language features and design patterns.

Function Documentation

◆ Identity()

bool ts::Identity ( bool  arg)
inline

MonoBoolPredicate identity.

Parameters
[in]argA boolean argument.
Returns
The same as arg.

◆ Not()

bool ts::Not ( bool  arg)
inline

MonoBoolPredicate "not".

Parameters
[in]argA boolean argument.
Returns
Not arg.

◆ And()

bool ts::And ( bool  arg1,
bool  arg2 
)
inline

BoolPredicate "and".

Note this predicate does not allow the traditional "&&" short circuit. The two arguments are always evaluated.

Parameters
[in]arg1A boolean argument.
[in]arg2A boolean argument.
Returns
arg1 and arg2.

◆ Or()

bool ts::Or ( bool  arg1,
bool  arg2 
)
inline

BoolPredicate "or".

Note this predicate does not allow the traditional "||" short circuit. The two arguments are always evaluated.

Parameters
[in]arg1A boolean argument.
[in]arg2A boolean argument.
Returns
arg1 or arg2.

◆ Nand()

bool ts::Nand ( bool  arg1,
bool  arg2 
)
inline

BoolPredicate "nand".

Parameters
[in]arg1A boolean argument.
[in]arg2A boolean argument.
Returns
Not arg1 and arg2.

◆ Nor()

bool ts::Nor ( bool  arg1,
bool  arg2 
)
inline

BoolPredicate "nor".

Parameters
[in]arg1A boolean argument.
[in]arg2A boolean argument.
Returns
Notarg1 or arg2.

◆ Xor()

bool ts::Xor ( bool  arg1,
bool  arg2 
)
inline

BoolPredicate "exclusive or".

Parameters
[in]arg1A boolean argument.
[in]arg2A boolean argument.
Returns
arg1 xor arg2.

◆ MultiAnd()

bool ts::MultiAnd ( std::initializer_list< bool >  args)

MultiBoolPredicate "and".

Parameters
[in]argsA variable list of boolean arguments.
Returns
True if all boolean values in args are true, false otherwise.

◆ MultiOr()

bool ts::MultiOr ( std::initializer_list< bool >  args)

MultiBoolPredicate "or".

Parameters
[in]argsA variable list of boolean arguments.
Returns
True if any boolean values in args is true, false otherwise.

◆ MultiNand()

bool ts::MultiNand ( std::initializer_list< bool >  args)
inline

MultiBoolPredicate "nand".

Parameters
[in]argsA variable list of boolean arguments.
Returns
False if all boolean values in args are true, true otherwise.

◆ MultiNor()

bool ts::MultiNor ( std::initializer_list< bool >  args)
inline

MultiBoolPredicate "nor".

Parameters
[in]argsA variable list of boolean arguments.
Returns
False if any boolean values in args is true, true otherwise.