Android-cuttlefish cvd tool
Public Member Functions | Private Attributes | List of all members
cuttlefish::WeakFD Class Reference

#include <shared_fd.h>

Public Member Functions

 WeakFD (SharedFD shared_fd)
 
SharedFD lock () const
 

Private Attributes

std::weak_ptr< FileInstancevalue_
 

Detailed Description

A non-owning reference to a FileInstance. The referenced FileInstance needs to be managed by a SharedFD. A WeakFD needs to be converted to a SharedFD to access the underlying FileInstance.

Constructor & Destructor Documentation

◆ WeakFD()

cuttlefish::WeakFD::WeakFD ( SharedFD  shared_fd)
inline

Member Function Documentation

◆ lock()

SharedFD cuttlefish::WeakFD::lock ( ) const

Member Data Documentation

◆ value_

std::weak_ptr<FileInstance> cuttlefish::WeakFD::value_
private

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