folly/folly/observer/Observer-inl.h

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <folly/Synchronized.h>
#include <folly/experimental/observer/detail/ObserverManager.h>

namespace folly {
namespace observer_detail {
template <typename F>
observer::Observer<ResultOfNoObserverUnwrap<F>> makeObserver(F&& creator) {}

template <typename F>
observer::Observer<ResultOfNoObserverUnwrap<F>> makeValueObserver(F&& creator) {}
} // namespace observer_detail

namespace observer {

template <typename T>
Snapshot<T> Observer<T>::getSnapshot() const {}

template <typename T>
Observer<T>::Observer(observer_detail::Core::Ptr core)
    :{}

template <typename T>
Observer<T> unwrap(Observer<T> o) {}

template <typename T>
Observer<T> unwrapValue(Observer<T> o) {}

template <typename T>
Observer<T> unwrap(Observer<Observer<T>> oo) {}

template <typename T>
Observer<T> unwrapValue(Observer<Observer<T>> oo) {}

template <typename F>
Observer<observer_detail::ResultOfUnwrapSharedPtr<F>> makeObserver(
    F&& creator) {}

template <typename F>
Observer<observer_detail::ResultOf<F>> makeObserver(F&& creator) {}

template <typename F>
Observer<observer_detail::ResultOfUnwrapObserver<F>> makeObserver(F&& creator) {}

template <typename T>
Observer<T> makeStaticObserver(T value) {}

template <typename T>
Observer<T> makeStaticObserver(std::shared_ptr<T> value) {}

template <typename T>
AtomicObserver<T>::AtomicObserver(Observer<T> observer)
    :{}

template <typename T>
AtomicObserver<T>::AtomicObserver(const AtomicObserver<T>& other)
    :{}

template <typename T>
AtomicObserver<T>::AtomicObserver(AtomicObserver<T>&& other) noexcept
    :{}

template <typename T>
AtomicObserver<T>& AtomicObserver<T>::operator=(
    const AtomicObserver<T>& other) {}

template <typename T>
AtomicObserver<T>& AtomicObserver<T>::operator=(
    AtomicObserver<T>&& other) noexcept {}

template <typename T>
AtomicObserver<T>& AtomicObserver<T>::operator=(Observer<T> observer) {}

template <typename T>
T AtomicObserver<T>::get() const {}

template <typename T>
TLObserver<T>::TLObserver(Observer<T> observer)
    :{}

template <typename T>
TLObserver<T>::TLObserver(const TLObserver<T>& other)
    :{}

template <typename T>
TLObserver<T>::TLObserver(TLObserver<T>&& other) noexcept = default;

template <typename T>
const Snapshot<T>& TLObserver<T>::getSnapshotRef() const {}

template <typename T>
ReadMostlyAtomicObserver<T>::ReadMostlyAtomicObserver(Observer<T> observer)
    :{}

template <typename T>
T ReadMostlyAtomicObserver<T>::get() const {}

struct CallbackHandle::Context {};

inline CallbackHandle::CallbackHandle() {}

template <typename T>
CallbackHandle::CallbackHandle(
    Observer<T> observer, Function<void(Snapshot<T>)> callback) {}

inline CallbackHandle& CallbackHandle::operator=(
    CallbackHandle&& handle) noexcept {}

inline CallbackHandle::~CallbackHandle() {}

inline void CallbackHandle::cancel() {}

template <typename T>
CallbackHandle Observer<T>::addCallback(
    Function<void(Snapshot<T>)> callback) const {}

template <typename T>
Observer<T> makeValueObserver(Observer<T> observer) {}

template <typename F>
Observer<observer_detail::ResultOf<F>> makeValueObserver(F&& creator) {}

template <typename F>
Observer<observer_detail::ResultOfUnwrapObserver<F>> makeValueObserver(
    F&& creator) {}

template <typename F>
Observer<observer_detail::ResultOfUnwrapSharedPtr<F>> makeValueObserver(
    F&& creator) {}

} // namespace observer
} // namespace folly