MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / push_annotation

Method push_annotation

DSView/pv/data/decode/rowdata.cpp:113–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113bool RowData::push_annotation(Annotation *a)
114{
115 assert(a);
116
117 std::lock_guard<std::mutex> lock(_global_visitor_mutex);
118
119 try {
120 _annotations.push_back(a);
121 _item_count = _annotations.size();
122 _max_annotation = max(_max_annotation, a->end_sample() - a->start_sample());
123
124 if (a->end_sample() != a->start_sample()){
125 if (_min_annotation == 0){
126 _min_annotation = a->end_sample() - a->start_sample();
127 }
128 else{
129 _min_annotation = min(_min_annotation, a->end_sample() - a->start_sample());
130 }
131 }
132
133 return true;
134
135 } catch (const std::bad_alloc&) {
136 return false;
137 }
138}
139
140
141bool RowData::get_annotation(Annotation *ann, uint64_t index)

Callers 1

annotation_callbackMethod · 0.80

Calls 3

sizeMethod · 0.80
end_sampleMethod · 0.80
start_sampleMethod · 0.80

Tested by

no test coverage detected