22 #include <hwsd/types.h>
24 #include <lunchbox/referenced.h>
38 class Filter :
public lunchbox::Referenced
53 HWSD_API FilterPtr
operator | ( FilterPtr rhs );
74 HWSD_API
virtual bool operator() (
const GPUInfos& current,
77 HWSD_API
virtual bool operator() (
const NetInfos& current,
80 detail::Filter*
const impl_;
84 inline FilterPtr operator | ( FilterPtr a, FilterPtr b )
97 HWSD_API
virtual bool operator() (
const GPUInfos& current,
100 HWSD_API
virtual bool operator() (
const NetInfos& current,
115 HWSD_API
virtual bool operator() (
const GPUInfos& current,
125 HWSD_API
virtual ~SessionFilter();
128 HWSD_API
virtual bool operator() (
const GPUInfos& current,
131 HWSD_API
virtual bool operator() (
const NetInfos& current,
134 detail::SessionFilter*
const impl_;
145 HWSD_API
explicit GPUFilter(
const std::string& regex );
146 HWSD_API
virtual ~GPUFilter();
152 HWSD_API
virtual bool operator() (
const hwsd::GPUInfos& current,
155 detail::GPUFilter*
const impl_;
162 HWSD_API
NetFilter(
const lunchbox::Strings& prefixes,
163 const uint32_t type );
164 HWSD_API
virtual ~NetFilter();
170 HWSD_API
virtual bool operator() (
const hwsd::NetInfos& current,
173 detail::NetFilter*
const impl_;
176 #endif // HWSD_FILTER_H
virtual bool operator()(const hwsd::NetInfos ¤t, const hwsd::NetInfo &candidate)
SessionFilter(const std::string &name)
Matches the given name literally.
Defines export visibility macros for library hwsd.
Filter()
Create a new filter.
Filter overlapping duplicates with different GPU types.
Filters for a specific session.
GPUFilter(const std::string ®ex)
Matches the GPU agaings the given regex.
FilterPtr operator|=(FilterPtr rhs)
Chain another filter to this one.
virtual bool operator()(const hwsd::GPUInfos ¤t, const hwsd::GPUInfo &candidate)
A structure containing network-specific information.
virtual bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
virtual bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
Base class for all discovery filters.
Filter for network interfaces matching prefixes and/or type.
A structure containing GPU-specific information.
FilterPtr operator|(FilterPtr rhs)
Chain another filter to this one.
virtual bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
virtual bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
Call all chained operators.
Filters for a specific GPU regex.
Filters all duplicates during discovery.
virtual ~Filter()
Destruct this filter.