-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcpp.hint
More file actions
10 lines (10 loc) · 2.21 KB
/
cpp.hint
File metadata and controls
10 lines (10 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
// Hint files help the Visual Studio IDE interpret Visual C++ identifiers
// such as names of functions and macros.
// For more information see https://go.microsoft.com/fwlink/?linkid=865984
#define DEFINE_GETTER_SETTER(type, name, field) const type& Get##name() const noexcept { return field; } void Set##name(const type &value) noexcept { field = value; }
#define DEFINE_GETTER_SETTER_PTR(type, name, field) type Get##name() const noexcept { return field; } void Set##name(type value) noexcept { field = value; }
#define DEFINE_GET_SET_MOVE_REG_EXPR(type, name, field) const type& Get##name() const noexcept { return field; } void Set##name(type&& value) noexcept { UnregisterExpression(field.get()); field = std::move(value); RegisterExpression(this, field.get()); } type Detach##name() noexcept { UnregisterExpression(field.get()); return std::move(field); }
#define DEFINE_TRAILING_OBJ_SPAN_GETTER(name, idx, storage) inline auto name() { return storage.GetTrailingSpan<idx>(this); } inline auto name() const { return storage.GetTrailingSpan<idx>(this); }
#define REGISTER_CHILD(name) RegisterChild(this->name);
#define DEFINE_FLAGS_OPERATORS(EnumName, BackingType) inline static EnumName operator~(EnumName value) { return (EnumName)~(BackingType)value; } inline static EnumName operator|(EnumName lhs, EnumName rhs) { return (EnumName)((BackingType)lhs | (BackingType)rhs); } inline static EnumName operator&(EnumName lhs, EnumName rhs) { return (EnumName)((BackingType)lhs & (BackingType)rhs); } inline static EnumName operator^(EnumName lhs, EnumName rhs) { return (EnumName)((BackingType)lhs ^ (BackingType)rhs); } inline static EnumName& operator|=(EnumName& lhs, EnumName rhs) { return (EnumName&)((BackingType&)lhs |= (BackingType)rhs); } inline static EnumName& operator&=(EnumName& lhs, EnumName rhs) { return (EnumName&)((BackingType&)lhs &= (BackingType)rhs); } inline static EnumName& operator^=(EnumName& lhs, EnumName rhs) { return (EnumName&)((BackingType&)lhs ^= (BackingType)rhs); }
#define DEFINE_GET_SET_MOVE_CHILD(type, name, field) type Get##name() const noexcept { return field; } void Set##name(type value) noexcept { UnregisterChild(field); field = value; RegisterChild(field); } type& Get##name##Mut() noexcept { return field; }