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 HWSD_API bool operator()(const GPUInfos ¤t, const GPUInfo &candidate)
Defines export visibility macros for library 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.