powerd++  0.4.4
Classes | Typedefs | Enumerations | Variables
sys::io Namespace Reference

This namespace contains c++ wrappers for <cstdio> functionality. More...

Classes

struct  contains
 Check whether a set type contains a value. More...
 
struct  contains< set< Set ... >, Value >
 Specialise io::contains to unpack io::set. More...
 
struct  enable_if
 Similar to std::enable_if, but it also has the value of the expression. More...
 
struct  enable_if< false, T >
 Specialise enable_if for a false expression. More...
 
class  file
 Produces file access types around the C file handling facilities. More...
 
class  file< link, Features ... >
 Specialise for FILE object linking file instances. More...
 
class  file< own, Features ... >
 Specialise for FILE object owning file instances. More...
 
class  file_feature
 Implements the base functionality of all file access types. More...
 
class  file_feature< FileT, read, Tail ... >
 Implement read support for file types. More...
 
class  file_feature< FileT, seek, Tail ... >
 Implement seek support for file types. More...
 
class  file_feature< FileT, write, Tail ... >
 Implement write support for file types. More...
 
struct  is_superset_of
 Check whether the left hand set is a superest of the right hand set. More...
 
struct  is_superset_of< LSetT, set< RSet ... > >
 Specialise is_superset_of to unpack the right hand io::set. More...
 
struct  query
 Ask questions about the contents of a string. More...
 
struct  set
 Pack a set of integral values in a type. More...
 

Typedefs

template<class SetT , auto Value>
using contains_t = typename contains< SetT, Value >::type
 Check whether a set type contains a value. More...
 
template<class LSetT , class RSetT >
using is_superset_of_t = typename is_superset_of< LSetT, RSetT >::type
 Check whether the left hand set is a superest of the right hand set. More...
 

Enumerations

enum  feature { feature::read, feature::write, feature::seek }
 Feature flags for file type composition. More...
 
enum  ownership { ownership::own, ownership::link }
 Ownership relation to the underlying FILE object. More...
 

Variables

template<class SetT , auto Value>
constexpr const auto contains_v = contains<SetT, Value>::value
 Check whether a set type contains a value. More...
 
template<class LSetT , class RSetT >
constexpr const auto is_superset_of_v = is_superset_of<LSetT, RSetT>::value
 Check whether the left hand set is a superest of the right hand set. More...
 
file< link, write > ferr {stderr}
 File access instances for stderr.
 
file< link, write > fout {stdout}
 File access instances for stdout.
 
file< link, read > fin {stdin}
 File access instances for stdin.
 

Detailed Description

This namespace contains c++ wrappers for <cstdio> functionality.


Class Documentation

◆ sys::io::contains

struct sys::io::contains

template<class SetT, auto Value>
struct sys::io::contains< SetT, Value >

Check whether a set type contains a value.

Template Parameters
SetTA set of integral values packed in io::set
ValueThe value to look up

◆ sys::io::file

class sys::io::file

template<ownership Ownership, feature ... Features>
class sys::io::file< Ownership, Features >

Produces file access types around the C file handling facilities.

Template Parameters
OwnershipDetermine the ownership relationship to the underlying FILE object
FeaturesA list of features the file type supports
See also
ownership
feature
file<own, Features ...>
file<link, Features ...>
file_feature

◆ sys::io::is_superset_of

struct sys::io::is_superset_of

template<class LSetT, class RSetT>
struct sys::io::is_superset_of< LSetT, RSetT >

Check whether the left hand set is a superest of the right hand set.

Template Parameters
LSetT,RSetTTwo io::set instances

◆ sys::io::query

struct sys::io::query

Ask questions about the contents of a string.

Collaboration diagram for sys::io::query:
[legend]
Class Members
struct contains_ftor contains Query the string for characters.

◆ sys::io::set

struct sys::io::set

template<auto ... Set>
struct sys::io::set< Set >

Pack a set of integral values in a type.

Template Parameters
SetA set of integral values

Typedef Documentation

◆ contains_t

template<class SetT , auto Value>
using sys::io::contains_t = typedef typename contains<SetT, Value>::type

Check whether a set type contains a value.

Template Parameters
SetTA set of integral values packed in io::set
ValueThe value to look up

◆ is_superset_of_t

template<class LSetT , class RSetT >
using sys::io::is_superset_of_t = typedef typename is_superset_of<LSetT, RSetT>::type

Check whether the left hand set is a superest of the right hand set.

Template Parameters
LSetT,RSetTTwo io::set instances

Enumeration Type Documentation

◆ feature

enum sys::io::feature
strong

Feature flags for file type composition.

See also
file_feature
Enumerator
read 

The file type supports read operations.

See also
file_feature<FileT, read, Tail ...>
write 

The file type supports write operations.

See also
file_feature<FileT, write, Tail ...>
seek 

The file type supports seek operations.

See also
file_feature<FileT, seek, Tail ...>

◆ ownership

enum sys::io::ownership
strong

Ownership relation to the underlying FILE object.

Enumerator
own 

The file instance owns the FILE object.

See also
file<own, Features ...>
link 

The file instance refers to a FILE object managed somewhere else.

See also
file<link, Features ...>

Variable Documentation

◆ contains_v

template<class SetT , auto Value>
constexpr const auto sys::io::contains_v = contains<SetT, Value>::value
constexpr

Check whether a set type contains a value.

Template Parameters
SetTA set of integral values packed in io::set
ValueThe value to look up

◆ is_superset_of_v

template<class LSetT , class RSetT >
constexpr const auto sys::io::is_superset_of_v = is_superset_of<LSetT, RSetT>::value
constexpr

Check whether the left hand set is a superest of the right hand set.

Template Parameters
LSetT,RSetTTwo io::set instances