TSDuck Version 3.32-2780 (TSDuck - The MPEG Transport Stream Toolkit)
C++ language

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

Collaboration diagram for C++ language:

Files

file  tsAlgorithm.h
 Miscellaneous C++ algorithms supplementing the standard <algorithm>.
 
file  tsBCD.h
 Binary Coded Decimal utilities.
 
file  tsEnumUtils.h
 Some utilities on enumeration types.
 
file  tsFatal.h
 Handle some fatal situations.
 
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  tsStaticInstance.h
 Declare the initialization-order-safe macros for static object instances.
 
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::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::FixedPoint< INT_T, PREC, type >
 Template representation of fixed-precision numbers. More...
 
class  ts::FloatingPoint< FLOAT_T, PREC, type >
 Encapsulation of a double floating-point as an AbstractNumber. More...
 
class  ts::Fraction< INT_T, type >
 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, type >
 Encapsulation of an integer type as an AbstractNumber. More...
 
class  ts::InvalidValue
 Exception for generic invalid value error. 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::SafePtr< T, MUTEX >
 Template safe pointer (reference-counted, auto-delete, thread-safe). More...
 
class  ts::SingleDataStatistics< NUMBER, DEFAULT_FLOAT >
 Statistics over a single set of data (integer or floating point). More...
 
class  ts::SingletonManager
 Helper for singleton definition. 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::TypedEnumeration< ENUM, >
 Enumeration of typed enum/string pairs. More...
 
class  ts::UID
 A singleton which generates 64-bit UID, unique integer. More...
 
class  ts::UnimplementedMethod
 Unimplemented method error. More...
 
class  ts::UninitializedVariable
 Uninitialized variable error. More...
 
class  ts::UString
 An implementation of UTF-16 strings. More...
 
class  ts::Variable< T >
 A template class which defines a variable which can be either initialized or uninitialized. More...
 

Typedefs

typedef bool(* ts::BoolPredicate) (bool, bool)
 Declaration of a boolean predicate with two arguments.
 
typedef bool(* ts::MonoBoolPredicate) (bool)
 Declaration of a boolean predicate with one argument.
 
typedef bool(* ts::MultiBoolPredicate) (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". More...
 
bool ts::Identity (bool arg)
 MonoBoolPredicate identity. More...
 
bool ts::MultiAnd (std::initializer_list< bool > args)
 MultiBoolPredicate "and". More...
 
bool ts::MultiNand (std::initializer_list< bool > args)
 MultiBoolPredicate "nand". More...
 
bool ts::MultiNor (std::initializer_list< bool > args)
 MultiBoolPredicate "nor". More...
 
bool ts::MultiOr (std::initializer_list< bool > args)
 MultiBoolPredicate "or". More...
 
bool ts::Nand (bool arg1, bool arg2)
 BoolPredicate "nand". More...
 
bool ts::Nor (bool arg1, bool arg2)
 BoolPredicate "nor". More...
 
bool ts::Not (bool arg)
 MonoBoolPredicate "not". More...
 
bool ts::Or (bool arg1, bool arg2)
 BoolPredicate "or". More...
 
bool ts::Xor (bool arg1, bool arg2)
 BoolPredicate "exclusive or". More...
 

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.