Flutter Engine
tonic::DartArgIterator Class Reference

#include <dart_args.h>

Public Member Functions

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

Detailed Description

Definition at line 17 of file dart_args.h.

Constructor & Destructor Documentation

◆ DartArgIterator()

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

Definition at line 19 of file dart_args.h.

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

Member Function Documentation

◆ args()

◆ GetNext()

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

Definition at line 23 of file dart_args.h.

23  {
24  if (had_exception_)
25  return T();
26  Dart_Handle exception = nullptr;
27  T arg = DartConverter<T>::FromArguments(args_, index_++, exception);
28  if (exception) {
29  had_exception_ = true;
30  Dart_ThrowException(exception);
31  }
32  return arg;
33  }

◆ had_exception()

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

Definition at line 35 of file dart_args.h.

Referenced by tonic::DartCall(), tonic::DartCallConstructor(), and tonic::DartCallStatic().

35 { return had_exception_; }

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