Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::AccessibilityBridge Class Referenceabstract

#include <accessibility_bridge.h>

Inheritance diagram for flutter::AccessibilityBridge:
flutter::FlutterPlatformNodeDelegate::OwnerBridge ui::AXPlatformTreeManager ui::AXTreeObserver flutter::AccessibilityBridgeIos ui::AXTreeManager flutter::AccessibilityBridgeMac flutter::AccessibilityBridgeWindows flutter::TestAccessibilityBridge

Classes

class  IosDelegate
 

Public Member Functions

 AccessibilityBridge ()
 Creates a new instance of a accessibility bridge.
 
virtual ~AccessibilityBridge ()
 
void AddFlutterSemanticsNodeUpdate (const FlutterSemanticsNode2 &node)
 Adds a semantics node update to the pending semantics update. Calling this method alone will NOT update the semantics tree. To flush the pending updates, call the CommitUpdates().
 
void AddFlutterSemanticsCustomActionUpdate (const FlutterSemanticsCustomAction2 &action)
 Adds a custom semantics action update to the pending semantics update. Calling this method alone will NOT update the semantics tree. To flush the pending updates, call the CommitUpdates().
 
void CommitUpdates ()
 Flushes the pending updates and applies them to this accessibility bridge. Calling this with no pending updates does nothing, and callers should call this method at the end of an atomic batch to avoid leaving the tree in a unstable state. For example if a node reparents from A to B, callers should only call this method when both removal from A and addition to B are in the pending updates.
 
std::weak_ptr< FlutterPlatformNodeDelegateGetFlutterPlatformNodeDelegateFromID (AccessibilityNodeId id) const
 Get the flutter platform node delegate with the given id from this accessibility bridge. Returns expired weak_ptr if the delegate associated with the id does not exist or has been removed from the accessibility tree.
 
const ui::AXTreeDataGetAXTreeData () const
 Get the ax tree data from this accessibility bridge. The tree data contains information such as the id of the node that has the keyboard focus or the text selection range.
 
const std::vector< ui::AXEventGenerator::TargetedEventGetPendingEvents () const
 Gets all pending accessibility events generated during semantics updates. This is useful when deciding how to handle events in AccessibilityBridgeDelegate::OnAccessibilityEvent in case one may decide to handle an event differently based on all pending events.
 
ui::AXNodeGetNodeFromTree (const ui::AXTreeID tree_id, const ui::AXNode::AXID node_id) const override
 
ui::AXNodeGetNodeFromTree (const ui::AXNode::AXID node_id) const override
 
ui::AXTreeID GetTreeID () const override
 
ui::AXTreeID GetParentTreeID () const override
 
ui::AXNodeGetRootAsAXNode () const override
 
ui::AXNodeGetParentNodeFromParentTreeAsAXNode () const override
 
ui::AXTreeGetTree () const override
 
ui::AXPlatformNodeGetPlatformNodeFromTree (const ui::AXNode::AXID node_id) const override
 
ui::AXPlatformNodeGetPlatformNodeFromTree (const ui::AXNode &node) const override
 
ui::AXPlatformNodeDelegateRootDelegate () const override
 
 AccessibilityBridge (FlutterViewController *view_controller, PlatformViewIOS *platform_view, __weak FlutterPlatformViewsController *platform_views_controller, std::unique_ptr< IosDelegate > ios_delegate=nullptr)
 
 ~AccessibilityBridge ()
 
void UpdateSemantics (flutter::SemanticsNodeUpdates nodes, const flutter::CustomAccessibilityActionUpdates &actions)
 
void HandleEvent (NSDictionary< NSString *, id > *annotatedEvent)
 
void DispatchSemanticsAction (int32_t id, flutter::SemanticsAction action) override
 
void DispatchSemanticsAction (int32_t id, flutter::SemanticsAction action, fml::MallocMapping args) override
 
void AccessibilityObjectDidBecomeFocused (int32_t id) override
 
void AccessibilityObjectDidLoseFocus (int32_t id) override
 
NSString * GetDefaultLocale () override
 
UIView< UITextInput > * textInputView () override
 
UIView * view () const override
 
bool isVoiceOverRunning () const override
 
fml::WeakPtr< AccessibilityBridgeGetWeakPtr ()
 
FlutterPlatformViewsControllerGetPlatformViewsController () const override
 
void clearState ()
 
- Public Member Functions inherited from flutter::FlutterPlatformNodeDelegate::OwnerBridge
virtual ~OwnerBridge ()=default
 
- Public Member Functions inherited from ui::AXPlatformTreeManager
virtual ~AXPlatformTreeManager ()=default
 
- Public Member Functions inherited from ui::AXTreeManager
virtual ~AXTreeManager ()=default
 
- Public Member Functions inherited from flutter::AccessibilityBridgeIos
virtual ~AccessibilityBridgeIos ()=default
 

Protected Member Functions

virtual void OnAccessibilityEvent (ui::AXEventGenerator::TargetedEvent targeted_event)=0
 Handle accessibility events generated due to accessibility tree changes. These events are needed to be sent to native accessibility system. See ui::AXEventGenerator::Event for possible events.
 
virtual std::shared_ptr< FlutterPlatformNodeDelegateCreateFlutterPlatformNodeDelegate ()=0
 Creates a platform specific FlutterPlatformNodeDelegate. Ownership passes to the caller. This method will be called whenever a new AXNode is created in AXTree. Each platform needs to implement this method in order to inject its subclass into the accessibility bridge.
 
- Protected Member Functions inherited from flutter::FlutterPlatformNodeDelegate::OwnerBridge
virtual void DispatchAccessibilityAction (AccessibilityNodeId target, FlutterSemanticsAction action, fml::MallocMapping data)=0
 Dispatch accessibility action back to the Flutter framework. These actions are generated in the native accessibility system when users interact with the assistive technologies. For example, a FlutterSemanticsAction::kFlutterSemanticsActionTap is fired when user click or touch the screen.
 

Detailed Description

Use this class to maintain an accessibility tree. This class consumes semantics updates from the embedder API and produces an accessibility tree in the native format.

The bridge creates an AXTree to hold the semantics data that comes from Flutter semantics updates. The tree holds AXNode[s] which contain the semantics information for semantics node. The AXTree resemble the Flutter semantics tree in the Flutter framework. The bridge also uses FlutterPlatformNodeDelegate to wrap each AXNode in order to provide an accessibility tree in the native format.

To use this class, one must subclass this class and provide their own implementation of FlutterPlatformNodeDelegate.

AccessibilityBridge must be created as a shared_ptr, since some methods acquires its weak_ptr.

An accessibility instance is bound to one FlutterViewController and FlutterView instance.

It helps populate the UIView's accessibilityElements property from Flutter's semantics nodes.

Definition at line 40 of file accessibility_bridge.h.

Constructor & Destructor Documentation

◆ AccessibilityBridge() [1/2]

flutter::AccessibilityBridge::AccessibilityBridge ( )

Creates a new instance of a accessibility bridge.

Definition at line 23 of file accessibility_bridge.cc.

24 : tree_(std::make_unique<ui::AXTree>()) {
25 event_generator_.SetTree(tree_.get());
26 tree_->AddObserver(static_cast<ui::AXTreeObserver*>(this));
27 ui::AXTreeData data = tree_->data();
29 tree_->UpdateData(data);
31 this);
32}
void SetTree(AXTree *new_tree)
static AXTreeID CreateNewAXTreeID()
Definition ax_tree_id.cc:47
void AddTreeManager(AXTreeID tree_id, AXTreeManager *manager)
static AXTreeManagerMap & GetInstance()
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switch_defs.h:36

References ui::AXTreeManagerMap::AddTreeManager(), ui::AXTreeID::CreateNewAXTreeID(), flutter::data, ui::AXTreeManagerMap::GetInstance(), and ui::AXEventGenerator::SetTree().

◆ ~AccessibilityBridge() [1/2]

flutter::AccessibilityBridge::~AccessibilityBridge ( )
virtual

Definition at line 34 of file accessibility_bridge.cc.

34 {
35 event_generator_.ReleaseTree();
36 tree_->RemoveObserver(static_cast<ui::AXTreeObserver*>(this));
37}

References ui::AXEventGenerator::ReleaseTree().

◆ AccessibilityBridge() [2/2]

flutter::AccessibilityBridge::AccessibilityBridge ( FlutterViewController view_controller,
PlatformViewIOS platform_view,
__weak FlutterPlatformViewsController platform_views_controller,
std::unique_ptr< IosDelegate ios_delegate = nullptr 
)

◆ ~AccessibilityBridge() [2/2]

flutter::AccessibilityBridge::~AccessibilityBridge ( )

Member Function Documentation

◆ AccessibilityObjectDidBecomeFocused()

void flutter::AccessibilityBridge::AccessibilityObjectDidBecomeFocused ( int32_t  id)
overridevirtual

A callback that is called when a SemanticObject receives focus.

The input id is the uid of the newly focused SemanticObject.

Implements flutter::AccessibilityBridgeIos.

◆ AccessibilityObjectDidLoseFocus()

void flutter::AccessibilityBridge::AccessibilityObjectDidLoseFocus ( int32_t  id)
overridevirtual

A callback that is called when a SemanticObject loses focus

The input id is the uid of the newly focused SemanticObject.

Implements flutter::AccessibilityBridgeIos.

◆ AddFlutterSemanticsCustomActionUpdate()

void flutter::AccessibilityBridge::AddFlutterSemanticsCustomActionUpdate ( const FlutterSemanticsCustomAction2 action)

Adds a custom semantics action update to the pending semantics update. Calling this method alone will NOT update the semantics tree. To flush the pending updates, call the CommitUpdates().

Parameters
[in]actionA reference to the custom semantics action update.

Definition at line 44 of file accessibility_bridge.cc.

45 {
46 pending_semantics_custom_action_updates_[action.id] =
47 FromFlutterSemanticsCustomAction(action);
48}

References action.

◆ AddFlutterSemanticsNodeUpdate()

void flutter::AccessibilityBridge::AddFlutterSemanticsNodeUpdate ( const FlutterSemanticsNode2 node)

Adds a semantics node update to the pending semantics update. Calling this method alone will NOT update the semantics tree. To flush the pending updates, call the CommitUpdates().

Parameters
[in]nodeA reference to the semantics node update.

Definition at line 39 of file accessibility_bridge.cc.

40 {
41 pending_semantics_node_updates_[node.id] = FromFlutterSemanticsNode(node);
42}
int32_t id
The unique identifier for this node.
Definition embedder.h:1613

References FlutterSemanticsNode2::id.

◆ clearState()

void flutter::AccessibilityBridge::clearState ( )

◆ CommitUpdates()

void flutter::AccessibilityBridge::CommitUpdates ( )

Flushes the pending updates and applies them to this accessibility bridge. Calling this with no pending updates does nothing, and callers should call this method at the end of an atomic batch to avoid leaving the tree in a unstable state. For example if a node reparents from A to B, callers should only call this method when both removal from A and addition to B are in the pending updates.

Definition at line 50 of file accessibility_bridge.cc.

50 {
51 // AXTree cannot move a node in a single update.
52 // This must be split across two updates:
53 //
54 // * Update 1: remove nodes from their old parents.
55 // * Update 2: re-add nodes (including their children) to their new parents.
56 //
57 // First, start by removing nodes if necessary.
58 std::optional<ui::AXTreeUpdate> remove_reparented =
59 CreateRemoveReparentedNodesUpdate();
60 if (remove_reparented.has_value()) {
61 tree_->Unserialize(remove_reparented.value());
62
63 std::string error = tree_->error();
64 if (!error.empty()) {
65 FML_LOG(ERROR) << "Failed to update ui::AXTree, error: " << error;
66 assert(false);
67 return;
68 }
69 }
70
71 // Second, apply the pending node updates. This also moves reparented nodes to
72 // their new parents if needed.
73 ui::AXTreeUpdate update{.tree_data = tree_->data()};
74
75 // Figure out update order, ui::AXTree only accepts update in tree order,
76 // where parent node must come before the child node in
77 // ui::AXTreeUpdate.nodes. We start with picking a random node and turn the
78 // entire subtree into a list. We pick another node from the remaining update,
79 // and keep doing so until the update map is empty. We then concatenate the
80 // lists in the reversed order, this guarantees parent updates always come
81 // before child updates. If the root is in the update, it is guaranteed to
82 // be the first node of the last list.
83 std::vector<std::vector<SemanticsNode>> results;
84 while (!pending_semantics_node_updates_.empty()) {
85 auto begin = pending_semantics_node_updates_.begin();
86 SemanticsNode target = begin->second;
87 std::vector<SemanticsNode> sub_tree_list;
88 GetSubTreeList(target, sub_tree_list);
89 results.push_back(sub_tree_list);
90 pending_semantics_node_updates_.erase(begin);
91 }
92
93 for (size_t i = results.size(); i > 0; i--) {
94 for (const SemanticsNode& node : results[i - 1]) {
95 ConvertFlutterUpdate(node, update);
96 }
97 }
98
99 // The first update must set the tree's root, which is guaranteed to be the
100 // last list's first node. A tree's root node never changes, though it can be
101 // modified.
102 if (!results.empty() && GetRootAsAXNode()->id() == ui::AXNode::kInvalidAXID) {
103 FML_DCHECK(!results.back().empty());
104
105 update.root_id = results.back().front().id;
106 }
107
108 tree_->Unserialize(update);
109 pending_semantics_node_updates_.clear();
110 pending_semantics_custom_action_updates_.clear();
111
112 std::string error = tree_->error();
113 if (!error.empty()) {
114 FML_LOG(ERROR) << "Failed to update ui::AXTree, error: " << error;
115 return;
116 }
117 // Handles accessibility events as the result of the semantics update.
118 for (const auto& targeted_event : event_generator_) {
119 auto event_target =
120 GetFlutterPlatformNodeDelegateFromID(targeted_event.node->id());
121 if (event_target.expired()) {
122 continue;
123 }
124
125 OnAccessibilityEvent(targeted_event);
126 }
127 event_generator_.ClearEvents();
128}
std::weak_ptr< FlutterPlatformNodeDelegate > GetFlutterPlatformNodeDelegateFromID(AccessibilityNodeId id) const
Get the flutter platform node delegate with the given id from this accessibility bridge....
ui::AXNode * GetRootAsAXNode() const override
virtual void OnAccessibilityEvent(ui::AXEventGenerator::TargetedEvent targeted_event)=0
Handle accessibility events generated due to accessibility tree changes. These events are needed to b...
static constexpr AXID kInvalidAXID
Definition ax_node.h:41
const uint8_t uint32_t uint32_t GError ** error
uint32_t * target
#define FML_LOG(severity)
Definition logging.h:101
#define FML_DCHECK(condition)
Definition logging.h:122

References ui::AXEventGenerator::ClearEvents(), error, FML_DCHECK, FML_LOG, GetFlutterPlatformNodeDelegateFromID(), GetRootAsAXNode(), i, ui::AXNode::kInvalidAXID, OnAccessibilityEvent(), target, and ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::tree_data.

◆ CreateFlutterPlatformNodeDelegate()

virtual std::shared_ptr< FlutterPlatformNodeDelegate > flutter::AccessibilityBridge::CreateFlutterPlatformNodeDelegate ( )
protectedpure virtual

Creates a platform specific FlutterPlatformNodeDelegate. Ownership passes to the caller. This method will be called whenever a new AXNode is created in AXTree. Each platform needs to implement this method in order to inject its subclass into the accessibility bridge.

Implemented in flutter::TestAccessibilityBridge, flutter::AccessibilityBridgeMac, and flutter::AccessibilityBridgeWindows.

References id, transform, and value.

◆ DispatchSemanticsAction() [1/2]

void flutter::AccessibilityBridge::DispatchSemanticsAction ( int32_t  id,
flutter::SemanticsAction  action 
)
overridevirtual

◆ DispatchSemanticsAction() [2/2]

void flutter::AccessibilityBridge::DispatchSemanticsAction ( int32_t  id,
flutter::SemanticsAction  action,
fml::MallocMapping  args 
)
overridevirtual

◆ GetAXTreeData()

const ui::AXTreeData & flutter::AccessibilityBridge::GetAXTreeData ( ) const

Get the ax tree data from this accessibility bridge. The tree data contains information such as the id of the node that has the keyboard focus or the text selection range.

Definition at line 141 of file accessibility_bridge.cc.

141 {
142 return tree_->data();
143}

Referenced by flutter::AccessibilityBridgeWindows::GetFocusedNode().

◆ GetDefaultLocale()

NSString * flutter::AccessibilityBridge::GetDefaultLocale ( )
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 65 of file accessibility_bridge.h.

65{ return view_controller_.applicationLocale; }

◆ GetFlutterPlatformNodeDelegateFromID()

std::weak_ptr< FlutterPlatformNodeDelegate > flutter::AccessibilityBridge::GetFlutterPlatformNodeDelegateFromID ( AccessibilityNodeId  id) const

Get the flutter platform node delegate with the given id from this accessibility bridge. Returns expired weak_ptr if the delegate associated with the id does not exist or has been removed from the accessibility tree.

Parameters
[in]idThe id of the flutter accessibility node you want to retrieve.

Definition at line 131 of file accessibility_bridge.cc.

132 {
133 const auto iter = id_wrapper_map_.find(id);
134 if (iter != id_wrapper_map_.end()) {
135 return iter->second;
136 }
137
138 return std::weak_ptr<FlutterPlatformNodeDelegate>();
139}

Referenced by CommitUpdates(), flutter::AccessibilityBridgeWindows::GetFocusedNode(), GetPlatformNodeFromTree(), flutter::AccessibilityBridgeWindows::OnAccessibilityEvent(), and RootDelegate().

◆ GetNodeFromTree() [1/2]

ui::AXNode * flutter::AccessibilityBridge::GetNodeFromTree ( const ui::AXNode::AXID  node_id) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 697 of file accessibility_bridge.cc.

698 {
699 return tree_->GetFromId(node_id);
700}

◆ GetNodeFromTree() [2/2]

ui::AXNode * flutter::AccessibilityBridge::GetNodeFromTree ( const ui::AXTreeID  tree_id,
const ui::AXNode::AXID  node_id 
) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 691 of file accessibility_bridge.cc.

693 {
694 return GetNodeFromTree(node_id);
695}
ui::AXNode * GetNodeFromTree(const ui::AXTreeID tree_id, const ui::AXNode::AXID node_id) const override

References GetNodeFromTree().

Referenced by GetNodeFromTree().

◆ GetParentNodeFromParentTreeAsAXNode()

ui::AXNode * flutter::AccessibilityBridge::GetParentNodeFromParentTreeAsAXNode ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 714 of file accessibility_bridge.cc.

714 {
715 return nullptr;
716}

◆ GetParentTreeID()

ui::AXTreeID flutter::AccessibilityBridge::GetParentTreeID ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 706 of file accessibility_bridge.cc.

706 {
707 return ui::AXTreeIDUnknown();
708}
const AXTreeID & AXTreeIDUnknown()

References ui::AXTreeIDUnknown().

◆ GetPendingEvents()

const std::vector< ui::AXEventGenerator::TargetedEvent > flutter::AccessibilityBridge::GetPendingEvents ( ) const

Gets all pending accessibility events generated during semantics updates. This is useful when deciding how to handle events in AccessibilityBridgeDelegate::OnAccessibilityEvent in case one may decide to handle an event differently based on all pending events.

Definition at line 146 of file accessibility_bridge.cc.

146 {
147 std::vector<ui::AXEventGenerator::TargetedEvent> result(
148 event_generator_.begin(), event_generator_.end());
149 return result;
150}

References ui::AXEventGenerator::begin(), and ui::AXEventGenerator::end().

◆ GetPlatformNodeFromTree() [1/2]

ui::AXPlatformNode * flutter::AccessibilityBridge::GetPlatformNodeFromTree ( const ui::AXNode node) const
overridevirtual

Implements ui::AXPlatformTreeManager.

Definition at line 732 of file accessibility_bridge.cc.

733 {
734 return GetPlatformNodeFromTree(node.id());
735}
ui::AXPlatformNode * GetPlatformNodeFromTree(const ui::AXNode::AXID node_id) const override
AXID id() const
Definition ax_node.h:110

References GetPlatformNodeFromTree(), and ui::AXNode::id().

◆ GetPlatformNodeFromTree() [2/2]

ui::AXPlatformNode * flutter::AccessibilityBridge::GetPlatformNodeFromTree ( const ui::AXNode::AXID  node_id) const
overridevirtual

Implements ui::AXPlatformTreeManager.

Definition at line 722 of file accessibility_bridge.cc.

723 {
724 auto platform_delegate_weak = GetFlutterPlatformNodeDelegateFromID(node_id);
725 auto platform_delegate = platform_delegate_weak.lock();
726 if (!platform_delegate) {
727 return nullptr;
728 }
729 return platform_delegate->GetPlatformNode();
730}

References GetFlutterPlatformNodeDelegateFromID().

Referenced by flutter::FlutterPlatformNodeDelegate::GetFromNodeID(), flutter::FlutterPlatformNodeDelegate::GetFromTreeIDAndNodeID(), and GetPlatformNodeFromTree().

◆ GetPlatformViewsController()

FlutterPlatformViewsController * flutter::AccessibilityBridge::GetPlatformViewsController ( ) const
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 75 of file accessibility_bridge.h.

75 {
76 return platform_views_controller_;
77 };

◆ GetRootAsAXNode()

ui::AXNode * flutter::AccessibilityBridge::GetRootAsAXNode ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 710 of file accessibility_bridge.cc.

710 {
711 return tree_->root();
712}

Referenced by CommitUpdates(), and RootDelegate().

◆ GetTree()

ui::AXTree * flutter::AccessibilityBridge::GetTree ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 718 of file accessibility_bridge.cc.

718 {
719 return tree_.get();
720}

◆ GetTreeID()

ui::AXTreeID flutter::AccessibilityBridge::GetTreeID ( ) const
overridevirtual

Implements ui::AXTreeManager.

Definition at line 702 of file accessibility_bridge.cc.

702 {
703 return tree_->GetAXTreeID();
704}

◆ GetWeakPtr()

fml::WeakPtr< AccessibilityBridge > flutter::AccessibilityBridge::GetWeakPtr ( )

◆ HandleEvent()

void flutter::AccessibilityBridge::HandleEvent ( NSDictionary< NSString *, id > *  annotatedEvent)

◆ isVoiceOverRunning()

bool flutter::AccessibilityBridge::isVoiceOverRunning ( ) const
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 71 of file accessibility_bridge.h.

71{ return view_controller_.isVoiceOverRunning; }

◆ OnAccessibilityEvent()

virtual void flutter::AccessibilityBridge::OnAccessibilityEvent ( ui::AXEventGenerator::TargetedEvent  targeted_event)
protectedpure virtual

Handle accessibility events generated due to accessibility tree changes. These events are needed to be sent to native accessibility system. See ui::AXEventGenerator::Event for possible events.

Parameters
[in]targeted_eventThe object that contains both the generated event and the event target.

Implemented in flutter::TestAccessibilityBridge, flutter::AccessibilityBridgeMac, and flutter::AccessibilityBridgeWindows.

Referenced by CommitUpdates().

◆ RootDelegate()

ui::AXPlatformNodeDelegate * flutter::AccessibilityBridge::RootDelegate ( ) const
overridevirtual

◆ textInputView()

UIView< UITextInput > * flutter::AccessibilityBridge::textInputView ( )
overridevirtual

◆ UpdateSemantics()

void flutter::AccessibilityBridge::UpdateSemantics ( flutter::SemanticsNodeUpdates  nodes,
const flutter::CustomAccessibilityActionUpdates actions 
)

◆ view()

UIView * flutter::AccessibilityBridge::view ( ) const
inlineoverridevirtual

Implements flutter::AccessibilityBridgeIos.

Definition at line 69 of file accessibility_bridge.h.

69{ return view_controller_.view; }

References flutter::FlutterViewController::view().


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