Skip to content

Commit

Permalink
Makes CalculatorContext::GetGraphServiceManager() private
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 676853825
  • Loading branch information
MediaPipe Team authored and copybara-github committed Sep 20, 2024
1 parent 934df3c commit 31341f2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions mediapipe/framework/calculator_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,6 @@ class CalculatorContext {
return ServiceBinding<T>(calculator_state_->GetServiceObject(service));
}

// Returns the graph-level service manager for sharing its services with
// calculator-nested MP graphs.
// Note: For accessing MP services from a calculator, use the
// ServiceBinding<T> Service(kService) method above.
const GraphServiceManager* GetGraphServiceManager() const {
return calculator_state_->GetGraphServiceManager();
}

// Gets interface to access resources (file system, assets, etc.) from
// calculators.
//
Expand All @@ -159,7 +151,18 @@ class CalculatorContext {
return calculator_state_->GetResources();
}

// Enables access to private GetGraphServiceManager() method.
friend class CalculatorGraph;

private:
// Returns the graph-level service manager for sharing its services with
// calculator-nested MP graphs.
// Note: For accessing MP services from a calculator, use the
// ServiceBinding<T> Service(kService) method above.
const GraphServiceManager* GetGraphServiceManager() const {
return calculator_state_->GetGraphServiceManager();
}

int NumberOfTimestamps() const {
return static_cast<int>(input_timestamps_.size());
}
Expand Down

0 comments on commit 31341f2

Please sign in to comment.