Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
cpp_indexer.SymbolsIndex Class Reference

Public Member Functions

Optional[Locationtry_resolve (self, str ref)
 

Static Public Attributes

str commit
 
list files = field(default_factory=list)
 
Dict classes = field(default_factory=dict)
 
Dict functions = field(default_factory=dict)
 

Protected Member Functions

Optional[str] _try_resolve_impl (self, str ref)
 
Location _location_from_string (self, str loc)
 

Detailed Description

Index of C++ symbols extracted from source.

Definition at line 98 of file cpp_indexer.py.

Member Function Documentation

◆ _location_from_string()

Location cpp_indexer.SymbolsIndex._location_from_string (   self,
str  loc 
)
protected

Definition at line 123 of file cpp_indexer.py.

123 def _location_from_string(self, loc: str) -> Location:
124 (file_idx, line_idx) = loc.split(':', 1)
125 return Location(self.files[int(file_idx)], int(line_idx))
126
127
Type::kYUV Type::kRGBA() int(0.7 *637)

◆ _try_resolve_impl()

Optional[str] cpp_indexer.SymbolsIndex._try_resolve_impl (   self,
str  ref 
)
protected

Definition at line 112 of file cpp_indexer.py.

112 def _try_resolve_impl(self, ref: str) -> Optional[str]:
113 if ref in self.functions:
114 return self.functions[ref]
115 if ref in self.classes:
116 return self.classes[ref].location
117 if '::' in ref:
118 (class_name, function_name) = ref.rsplit('::', 1)
119 if class_name in self.classes:
120 return self.classes[class_name].members.get(function_name)
121 return None
122

◆ try_resolve()

Optional[Location] cpp_indexer.SymbolsIndex.try_resolve (   self,
str  ref 
)
Resolve the location of the given reference.

Definition at line 105 of file cpp_indexer.py.

105 def try_resolve(self, ref: str) -> Optional[Location]:
106 """Resolve the location of the given reference."""
107 loc = self._try_resolve_impl(ref)
108 if loc is not None:
109 return self._location_from_string(loc)
110 return None
111

Member Data Documentation

◆ classes

Dict cpp_indexer.SymbolsIndex.classes = field(default_factory=dict)
static

Definition at line 102 of file cpp_indexer.py.

◆ commit

str cpp_indexer.SymbolsIndex.commit
static

Definition at line 100 of file cpp_indexer.py.

◆ files

list cpp_indexer.SymbolsIndex.files = field(default_factory=list)
static

Definition at line 101 of file cpp_indexer.py.

◆ functions

Dict cpp_indexer.SymbolsIndex.functions = field(default_factory=dict)
static

Definition at line 103 of file cpp_indexer.py.


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