nds2-client - ClientDeveloper  0.16.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
nds_impl::nds1::v12_2 Namespace Reference

Classes

class  ChannelListIterator
 

Typedefs

typedef std::array< char, 148 > raw_sc2_channel
 

Functions

template<typename Reader , class OutIt , class Transform = nds_impl::common::IdentityTransform< raw_sc2_channel >, class Predicate = nds_impl::common::TruePredicate< typename std::result_of< decltype ( &Transform::operator( ) )( Transform, raw_sc2_channel ) >::type >>
void read_get_channels (Reader &r, OutIt it, Transform t=Transform(), Predicate p=Predicate())
 

Typedef Documentation

typedef std::array< char, 148 > nds_impl::nds1::v12_2::raw_sc2_channel

Function Documentation

template<typename Reader , class OutIt , class Transform = nds_impl::common::IdentityTransform< raw_sc2_channel >, class Predicate = nds_impl::common::TruePredicate< typename std::result_of< decltype ( &Transform::operator( ) )( Transform, raw_sc2_channel ) >::type >>
void nds_impl::nds1::v12_2::read_get_channels ( Reader &  r,
OutIt  it,
Transform  t = Transform( ),
Predicate  p = Predicate( ) 
)

Read a nds1 status channels 2 response stream.

Template Parameters
ReaderThe type of the reader object, it must implement the BufferedReader interface
OutItOutput iterator type used to store channels, it must accept the output type of the transform object.
TransformCallable type that takes a raw_sc2_channel and returns what ever type you want to use.
PredicateFilter function/Predicate callable type that given a value (created by transform) returns true or false
Parameters
rThe reader object
itOutput iterator
tTransform object
pPredicate object/callable
Note
This function is straight forwared IFF you have the types lined up properly. The logic is essentially: for all input channels auto tmp = t(raw_sc2_channel) if p(tmp) { *it = tmp; ++it; } Transform should output the same type that is consumed by the predicate and the output iterator.