Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tonic::DartArgIterator Class Reference

#include <dart_args.h>

Public Member Functions

 DartArgIterator (Dart_NativeArguments args, int start_index=1)
 
template<typename T >
T GetNext ()
 
bool had_exception () const
 
Dart_NativeArguments args () const
 

Detailed Description

Definition at line 19 of file dart_args.h.

Constructor & Destructor Documentation

◆ DartArgIterator()

tonic::DartArgIterator::DartArgIterator ( Dart_NativeArguments  args,
int  start_index = 1 
)
inlineexplicit

Definition at line 21 of file dart_args.h.

22 : args_(args), index_(start_index), had_exception_(false) {}
Dart_NativeArguments args() const
Definition dart_args.h:39

Member Function Documentation

◆ args()

Dart_NativeArguments tonic::DartArgIterator::args ( ) const
inline

Definition at line 39 of file dart_args.h.

39{ return args_; }

◆ GetNext()

template<typename T >
T tonic::DartArgIterator::GetNext ( )
inline

Definition at line 25 of file dart_args.h.

25 {
26 if (had_exception_)
27 return T();
28 Dart_Handle exception = nullptr;
29 T arg = DartConverter<T>::FromArguments(args_, index_++, exception);
30 if (exception) {
31 had_exception_ = true;
32 Dart_ThrowException(exception);
33 }
34 return arg;
35 }
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception)
#define T

◆ had_exception()

bool tonic::DartArgIterator::had_exception ( ) const
inline

Definition at line 37 of file dart_args.h.

37{ return had_exception_; }

The documentation for this class was generated from the following file: