File: mixins.hpp

package info (click to toggle)
polybar 3.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,108 kB
  • sloc: cpp: 30,424; python: 3,750; sh: 284; makefile: 83
file content (33 lines) | stat: -rw-r--r-- 638 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

#include "common.hpp"

POLYBAR_NS

/**
 * Base class for non copyable objects
 */
class non_copyable_mixin {
 public:
  non_copyable_mixin(const non_copyable_mixin&) = delete;
  non_copyable_mixin& operator=(const non_copyable_mixin&) = delete;

 protected:
  non_copyable_mixin() = default;
  ~non_copyable_mixin() = default;
};

/**
 * Base class for non movable objects
 */
class non_movable_mixin {
 public:
  non_movable_mixin(non_movable_mixin&&) = delete;
  non_movable_mixin& operator=(non_movable_mixin&&) = delete;

 protected:
  non_movable_mixin() = default;
  ~non_movable_mixin() = default;
};

POLYBAR_NS_END