Flutter Impeller
impeller::CaptureProperty Struct Referenceabstract

A capturable property type. More...

#include <capture.h>

Inheritance diagram for impeller::CaptureProperty:
impeller::CaptureCursorListElement< CaptureProperty >

Classes

struct  Options
 

Public Types

enum  Type { Type::_FOR_EACH_CAPTURE_PROPERTY =(_CAPTURE_TYPE) }
 

Public Member Functions

 CaptureProperty (const std::string &label, Options options)
 
virtual ~CaptureProperty ()
 
virtual Type GetType () const =0
 
virtual void Invoke (const CaptureProcTable &proc_table)=0
 
bool MatchesCloselyEnough (const CaptureProperty &other) const override
 Determines if previously captured data matches closely enough with newly recorded data to safely emitted in its place. If this returns false, then the remaining elements in the capture list are discarded and re-recorded. More...
 
- Public Member Functions inherited from impeller::CaptureCursorListElement< CaptureProperty >
 CaptureCursorListElement (const std::string &label)
 
virtual ~CaptureCursorListElement ()=default
 

Public Attributes

Options options
 
- Public Attributes inherited from impeller::CaptureCursorListElement< CaptureProperty >
std::string label
 

Detailed Description

A capturable property type.

Definition at line 68 of file capture.h.

Member Enumeration Documentation

◆ Type

Enumerator
_FOR_EACH_CAPTURE_PROPERTY 

Definition at line 69 of file capture.h.

Constructor & Destructor Documentation

◆ CaptureProperty()

impeller::CaptureProperty::CaptureProperty ( const std::string &  label,
Options  options 
)

CaptureProperty

Definition at line 16 of file capture.cc.

◆ ~CaptureProperty()

impeller::CaptureProperty::~CaptureProperty ( )
virtualdefault

Member Function Documentation

◆ GetType()

virtual Type impeller::CaptureProperty::GetType ( ) const
pure virtual

Referenced by MatchesCloselyEnough().

◆ Invoke()

virtual void impeller::CaptureProperty::Invoke ( const CaptureProcTable proc_table)
pure virtual

◆ MatchesCloselyEnough()

bool impeller::CaptureProperty::MatchesCloselyEnough ( const CaptureProperty other) const
overridevirtual

Determines if previously captured data matches closely enough with newly recorded data to safely emitted in its place. If this returns false, then the remaining elements in the capture list are discarded and re-recorded.

This mechanism ensures that the UI of an interactive inspector can never deviate from reality, even if the schema of the captured data were to significantly deviate.

Implements impeller::CaptureCursorListElement< CaptureProperty >.

Definition at line 21 of file capture.cc.

21  {
22  if (label != other.label) {
23  return false;
24  }
25  if (GetType() != other.GetType()) {
26  return false;
27  }
28  return true;
29 }

References GetType(), impeller::CaptureCursorListElement< CaptureProperty >::label, and impeller::CaptureCursorListElement< Type >::label.

Member Data Documentation

◆ options

Options impeller::CaptureProperty::options

Definition at line 87 of file capture.h.


The documentation for this struct was generated from the following files:
impeller::CaptureProperty::options
Options options
Definition: capture.h:87
impeller::CaptureCursorListElement< CaptureProperty >::CaptureCursorListElement
CaptureCursorListElement(const std::string &label)
Definition: capture.h:45
impeller::CaptureCursorListElement< CaptureProperty >::label
std::string label
Definition: capture.h:43
_CAPTURE_TYPE
#define _CAPTURE_TYPE(type_name, pascal_name, lower_name)
Definition: capture.h:62
_FOR_EACH_CAPTURE_PROPERTY
#define _FOR_EACH_CAPTURE_PROPERTY(PROPERTY_V)
Definition: capture.h:30
impeller::CaptureProperty::GetType
virtual Type GetType() const =0