summaryrefslogtreecommitdiff
path: root/AVStream/avscamera/sys/NonCopyable.h
diff options
context:
space:
mode:
Diffstat (limited to 'AVStream/avscamera/sys/NonCopyable.h')
-rw-r--r--AVStream/avscamera/sys/NonCopyable.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/AVStream/avscamera/sys/NonCopyable.h b/AVStream/avscamera/sys/NonCopyable.h
new file mode 100644
index 00000000..98d7bad4
--- /dev/null
+++ b/AVStream/avscamera/sys/NonCopyable.h
@@ -0,0 +1,48 @@
+/**************************************************************************
+
+ A/V Stream Camera Sample
+
+ Copyright (c) 2013, Microsoft Corporation.
+
+ File:
+
+ NonCopyable.h
+
+ Abstract:
+
+ Simple base class that hides the copy ctor and assignment operators.
+
+ Derive from this class any time its not safe (or reasonable) to
+ permit copies of an object.
+
+ History:
+
+ created 5/8/2013
+
+**************************************************************************/
+#pragma once
+
+//
+// General base class for noncopyable objects
+//
+class CNonCopyable
+{
+protected:
+ CNonCopyable() {}
+ ~CNonCopyable() {}
+
+private:
+ CNonCopyable(
+ _In_ const CNonCopyable &
+ )
+ {}
+
+ const CNonCopyable &
+ operator =(
+ _In_ const CNonCopyable &
+ )
+ {
+ return *this;
+ }
+};
+