22 #include <hwsd/types.h>
24 #include <lunchbox/referenced.h>
37 class Filter :
public lunchbox::Referenced
52 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,
128 HWSD_API
virtual ~SessionFilter();
131 HWSD_API
virtual bool operator() (
const GPUInfos& current,
134 HWSD_API
virtual bool operator() (
const NetInfos& current,
137 detail::SessionFilter*
const impl_;
148 HWSD_API
GPUFilter(
const std::string& regex );
149 HWSD_API
virtual ~GPUFilter();
155 HWSD_API
virtual bool operator() (
const hwsd::GPUInfos& current,
158 detail::GPUFilter*
const impl_;
165 HWSD_API
NetFilter(
const lunchbox::Strings& prefixes,
166 const uint32_t type );
167 HWSD_API
virtual ~NetFilter();
173 HWSD_API
virtual bool operator() (
const hwsd::NetInfos& current,
176 detail::NetFilter*
const impl_;
179 #endif // HWSD_FILTER_H
virtual HWSD_API bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
Defines export visibility macros for hwsd.
HWSD_API Filter()
Create a new filter.
HWSD_API FilterPtr operator|=(FilterPtr rhs)
Chain another filter to this one.
Filter overlapping duplicates with different GPU types.
virtual HWSD_API ~Filter()
Destruct this filter.
Filters for a specific session.
virtual HWSD_API bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
Call all chained operators.
HWSD_API SessionFilter(const std::string &name)
Matches the given name literally.
virtual HWSD_API bool operator()(const hwsd::GPUInfos ¤t, const hwsd::GPUInfo &candidate)
virtual HWSD_API bool operator()(const hwsd::NetInfos ¤t, const hwsd::NetInfo &candidate)
A structure containing network-specific information.
HWSD_API GPUFilter(const std::string ®ex)
Matches the GPU agaings the given regex.
HWSD_API FilterPtr operator|(FilterPtr rhs)
Chain another filter to this one.
Base class for all discovery filters.
Filter for network interfaces matching prefixes and/or type.
A structure containing GPU-specific information.
virtual HWSD_API bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
Filters for a specific GPU regex.
virtual HWSD_API bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
Filters all duplicates during discovery.