Flutter Engine
dart_wrappable.h File Reference
#include "third_party/dart/runtime/include/dart_api.h"
#include "tonic/common/macros.h"
#include "tonic/converter/dart_converter.h"
#include "tonic/dart_state.h"
#include "tonic/dart_wrapper_info.h"
#include "tonic/logging/dart_error.h"
#include <type_traits>

Go to the source code of this file.

Classes

class  tonic::DartWrappable
 
struct  tonic::DartConverterWrappable
 
struct  tonic::DartConverter< T *, typename std::enable_if< std::is_convertible< T *, const DartWrappable * >::value >::type >
 
struct  tonic::DartConverter< PTR< T > >
 

Namespaces

 tonic
 

Macros

#define DEFINE_WRAPPERTYPEINFO()
 
#define IMPLEMENT_WRAPPERTYPEINFO(LibraryName, ClassName)
 

Functions

template<typename T >
T * tonic::GetReceiver (Dart_NativeArguments args)
 

Macro Definition Documentation

◆ DEFINE_WRAPPERTYPEINFO

#define DEFINE_WRAPPERTYPEINFO ( )
Value:
public: \
const tonic::DartWrapperInfo& GetDartWrapperInfo() const override { \
return dart_wrapper_info_; \
} \
static Dart_PersistentHandle GetDartType(tonic::DartState* dart_state) { \
return GetTypeForWrapper(dart_state, dart_wrapper_info_); \
} \
\
private: \
static const tonic::DartWrapperInfo& dart_wrapper_info_

Definition at line 71 of file dart_wrappable.h.

◆ IMPLEMENT_WRAPPERTYPEINFO

#define IMPLEMENT_WRAPPERTYPEINFO (   LibraryName,
  ClassName 
)
Value:
static const tonic::DartWrapperInfo \
kDartWrapperInfo_##LibraryName_##ClassName = { \
#LibraryName, \
#ClassName, \
sizeof(ClassName), \
}; \
const tonic::DartWrapperInfo& ClassName::dart_wrapper_info_ = \
kDartWrapperInfo_##LibraryName_##ClassName;

Definition at line 83 of file dart_wrappable.h.