diff options
author | crupest <crupest@outlook.com> | 2018-09-01 23:28:28 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-01 23:28:28 +0800 |
commit | 956a401f9c955f26b7e661dc80f76bfc43fc4124 (patch) | |
tree | 8af088933c7bc08942478daddd55c92de8668359 /CruUI/base.h | |
download | cru-956a401f9c955f26b7e661dc80f76bfc43fc4124.tar.gz cru-956a401f9c955f26b7e661dc80f76bfc43fc4124.tar.bz2 cru-956a401f9c955f26b7e661dc80f76bfc43fc4124.zip |
Initial commit
Diffstat (limited to 'CruUI/base.h')
-rw-r--r-- | CruUI/base.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/CruUI/base.h b/CruUI/base.h new file mode 100644 index 00000000..0d401a3a --- /dev/null +++ b/CruUI/base.h @@ -0,0 +1,42 @@ +#pragma once + +#include "global_macros.h" + +#include <folly/String.h> +#include <folly/Function.h> + +namespace cru +{ + enum class FlowControl + { + Continue, + Break + }; + + using String = folly::basic_fbstring<wchar_t>; + + template<typename FunctionType> + using Function = folly::Function<FunctionType>; + + template<typename... Args> + using Action = Function<void(Args...)>; + + template<typename... Args> + using FlowControlAction = Function<FlowControl(Args...)>; + + class Object + { + public: + Object() = default; + Object(const Object&) = default; + Object& operator = (const Object&) = default; + Object(Object&&) = default; + Object& operator = (Object&&) = default; + virtual ~Object() = default; + }; + + struct Interface + { + virtual ~Interface() = default; + }; +} |