resman: use set<> instead of vector<>
[android/external-libkmsxx.git] / kms++util / inc / kms++util / resourcemanager.h
1 #include <kms++/kms++.h>
2 #include <set>
3 #include <string>
5 namespace kms {
7 class ResourceManager
8 {
9 public:
10         ResourceManager(Card& card);
12         void reset();
14         Card& card() const { return m_card; }
15         Connector* reserve_connector(const std::string& name = "");
16         Connector* reserve_connector(Connector* conn);
17         Crtc* reserve_crtc(Connector* conn);
18         Crtc* reserve_crtc(Crtc* crtc);
19         Plane* reserve_plane(Crtc* crtc, PlaneType type, PixelFormat format = PixelFormat::Undefined);
20         Plane* reserve_plane(Plane* plane);
21         Plane* reserve_generic_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
22         Plane* reserve_primary_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
23         Plane* reserve_overlay_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
25 private:
26         Card& m_card;
27         std::set<Connector*> m_reserved_connectors;
28         std::set<Crtc*> m_reserved_crtcs;
29         std::set<Plane*> m_reserved_planes;
30 };
32 }