SHORE API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
shore::sorting_check< T, Cmp > Class Template Reference

Plugin to check that a dataset is sorted according to a comparator. More...

Inheritance diagram for shore::sorting_check< T, Cmp >:
shore::plugin< T >

Classes

struct  error
 Exception thrown on invalid sort order. More...
 

Public Types

typedef plugin< T > plugin_type
 
- Public Types inherited from shore::plugin< T >
enum  PluginResult { PLUGIN_SUCCESS =0, PLUGIN_STARVED =1, PLUGIN_END =2 }
 Result of plugin application. More...
 

Public Member Functions

 sorting_check (Cmp cmp=Cmp())
 Contructor - initialize with comparator.
 
 sorting_check (const std::string &name, Cmp cmp=Cmp())
 Contructor - initialize with a label for error messages and a comparator.
 
virtual int apply (std::deque< T * > &buffers, std::vector< T * > &unused, const bool flush)
 plugin function - check if first two elements in the buffer are correctly ordered.
 
Cmp get_comparator () const
 Get the comparator associated with the check.
 

Detailed Description

template<typename T, typename Cmp = bool (*)(const T &,const T &)>
class shore::sorting_check< T, Cmp >

Plugin to check that a dataset is sorted according to a comparator.


The documentation for this class was generated from the following file: