MCPcopy Create free account
hub / github.com/apache/brpc / Add

Method Add

src/butil/scoped_observer.h:26–29  ·  view source on GitHub ↗

Adds the object passed to the constructor as an observer on |source|.

Source from the content-addressed store, hash-verified

24
25 // Adds the object passed to the constructor as an observer on |source|.
26 void Add(Source* source) {
27 sources_.push_back(source);
28 source->AddObserver(observer_);
29 }
30
31 // Remove the object passed to the constructor as an observer from |source|.
32 void Remove(Source* source) {

Callers

nothing calls this directly

Calls 2

AddObserverMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected