Skip to content

Commit 8805ca4

Browse files
authored
Merge pull request #5 from Azaezel/virtuals-override
Virtuals override
2 parents 8dc3163 + cc3dd55 commit 8805ca4

3 files changed

Lines changed: 28 additions & 7 deletions

File tree

Engine/.clang-tidy

Lines changed: 0 additions & 6 deletions
This file was deleted.

Engine/lib/.clang-tidy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
Checks: '-*'
3+
WarningsAsErrors: ''
4+
HeaderFilterRegex: '.*'
5+
FormatStyle: 'file'

Engine/source/console/engineObject.h

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,28 @@ class EngineObject;
282282
template< typename T > friend struct ::_SCOPE; \
283283
template< typename T > friend T* _CREATE(); \
284284
template< typename T, typename Base > friend class ::EngineClassTypeInfo; \
285+
private: \
286+
typedef ::_Private::_AbstractClassBase< ThisType > _ClassBase; \
287+
static EngineClassTypeInfo< ThisType, _ClassBase > _smTypeInfo; \
288+
static EngineExportScope& __engineExportScope(); \
289+
static EnginePropertyTable& _smPropertyTable; \
290+
const EngineTypeInfo* __typeinfo() const override; \
291+
public:
292+
293+
/// Declare an abstract base class @a type derived from the class @a super.
294+
///
295+
/// Nearly identical to DECLARE_ABSTRACT_CLASS macro, but with virtual methods
296+
/// that are suppose to be override'd in child classes.
297+
///
298+
/// @see DECLARE_ABSTRACT_CLASS
299+
#define DECLARE_ABSTRACT_BASE_CLASS(type) \
300+
public: \
301+
typedef type ThisType; \
302+
typedef void SuperType; \
303+
template< typename T > friend struct ::_EngineTypeTraits; \
304+
template< typename T > friend struct ::_SCOPE; \
305+
template< typename T > friend T* _CREATE(); \
306+
template< typename T, typename Base > friend class ::EngineClassTypeInfo; \
285307
private: \
286308
typedef ::_Private::_AbstractClassBase< ThisType > _ClassBase; \
287309
static EngineClassTypeInfo< ThisType, _ClassBase > _smTypeInfo; \
@@ -504,7 +526,7 @@ class EngineObject : public StrongRefBase
504526
{
505527
public:
506528

507-
DECLARE_ABSTRACT_CLASS( EngineObject, void );
529+
DECLARE_ABSTRACT_BASE_CLASS( EngineObject );
508530
DECLARE_INSCOPE( _GLOBALSCOPE );
509531
DECLARE_INSTANTIABLE;
510532

0 commit comments

Comments
 (0)