LLVM 24.0.0git
llvm::cas::ObjectProxy Class Reference

Reference to an abstract hierarchical node, with data and references. More...

#include "llvm/CAS/ObjectStore.h"

Inheritance diagram for llvm::cas::ObjectProxy:
[legend]

Public Member Functions

ObjectStoregetCAS () const
CASID getID () const
ObjectRef getRef () const
size_t getNumReferences () const
ObjectRef getReference (size_t I) const
 operator CASID () const
CASID getReferenceID (size_t I) const
Error forEachReference (function_ref< Error(ObjectRef)> Callback) const
 Visit each reference in order, returning an error from Callback to stop early.
LLVM_ABI std::unique_ptr< MemoryBuffergetMemoryBuffer (StringRef Name="", bool RequiresNullTerminator=true) const
LLVM_ABI std::unique_ptr< MemoryBuffergetStandaloneMemoryBuffer (StringRef Name="", bool RequiresNullTerminator=true) const
 Get a MemoryBuffer that stays valid after the CAS is destroyed.
StringRef getData () const
 Get the content of the node. Valid as long as the CAS is valid.
Error exportDataToFile (StringRef Path) const
 Exports the data of an object to a file path.
 ObjectProxy ()=delete

Static Public Member Functions

static ObjectProxy load (ObjectStore &CAS, ObjectRef Ref, ObjectHandle Node)

Friends

bool operator== (const ObjectProxy &Proxy, ObjectRef Ref)
bool operator== (ObjectRef Ref, const ObjectProxy &Proxy)
bool operator!= (const ObjectProxy &Proxy, ObjectRef Ref)
bool operator!= (ObjectRef Ref, const ObjectProxy &Proxy)

Detailed Description

Reference to an abstract hierarchical node, with data and references.

Reference is passed by value and is expected to be valid as long as the ObjectStore is.

Definition at line 320 of file ObjectStore.h.

Constructor & Destructor Documentation

◆ ObjectProxy()

llvm::cas::ObjectProxy::ObjectProxy ( )
delete

Member Function Documentation

◆ exportDataToFile()

Error llvm::cas::ObjectProxy::exportDataToFile ( StringRef Path) const
inline

Exports the data of an object to a file path.

Definition at line 354 of file ObjectStore.h.

◆ forEachReference()

Error llvm::cas::ObjectProxy::forEachReference ( function_ref< Error(ObjectRef)> Callback) const
inline

Visit each reference in order, returning an error from Callback to stop early.

Definition at line 337 of file ObjectStore.h.

◆ getCAS()

ObjectStore & llvm::cas::ObjectProxy::getCAS ( ) const
inline

Definition at line 322 of file ObjectStore.h.

Referenced by getReferenceID().

◆ getData()

StringRef llvm::cas::ObjectProxy::getData ( ) const
inline

Get the content of the node. Valid as long as the CAS is valid.

Definition at line 351 of file ObjectStore.h.

Referenced by llvm::cas::NamedValuesProxy::getName().

◆ getID()

CASID llvm::cas::ObjectProxy::getID ( ) const
inline

Definition at line 323 of file ObjectStore.h.

Referenced by operator CASID().

◆ getMemoryBuffer()

std::unique_ptr< MemoryBuffer > ObjectProxy::getMemoryBuffer ( StringRef Name = "",
bool RequiresNullTerminator = true ) const

Definition at line 306 of file ObjectStore.cpp.

◆ getNumReferences()

size_t llvm::cas::ObjectProxy::getNumReferences ( ) const
inline

Definition at line 325 of file ObjectStore.h.

◆ getRef()

ObjectRef llvm::cas::ObjectProxy::getRef ( ) const
inline

Definition at line 324 of file ObjectStore.h.

Referenced by operator!=, operator!=, operator==, and operator==.

◆ getReference()

ObjectRef llvm::cas::ObjectProxy::getReference ( size_t I) const
inline

Definition at line 326 of file ObjectStore.h.

References I.

Referenced by getReferenceID().

◆ getReferenceID()

CASID llvm::cas::ObjectProxy::getReferenceID ( size_t I) const
inline

Definition at line 329 of file ObjectStore.h.

References assert(), getCAS(), llvm::cas::ObjectStore::getID(), getReference(), and I.

◆ getStandaloneMemoryBuffer()

std::unique_ptr< MemoryBuffer > ObjectProxy::getStandaloneMemoryBuffer ( StringRef Name = "",
bool RequiresNullTerminator = true ) const

Get a MemoryBuffer that stays valid after the CAS is destroyed.

Definition at line 312 of file ObjectStore.cpp.

◆ load()

ObjectProxy llvm::cas::ObjectProxy::load ( ObjectStore & CAS,
ObjectRef Ref,
ObjectHandle Node )
inlinestatic

◆ operator CASID()

llvm::cas::ObjectProxy::operator CASID ( ) const
inline

Definition at line 328 of file ObjectStore.h.

References getID().

◆ operator!= [1/2]

bool operator!= ( const ObjectProxy & Proxy,
ObjectRef Ref )
friend

Definition at line 364 of file ObjectStore.h.

References getRef(), and ObjectProxy().

◆ operator!= [2/2]

bool operator!= ( ObjectRef Ref,
const ObjectProxy & Proxy )
friend

Definition at line 367 of file ObjectStore.h.

References getRef(), and ObjectProxy().

◆ operator== [1/2]

bool operator== ( const ObjectProxy & Proxy,
ObjectRef Ref )
friend

Definition at line 358 of file ObjectStore.h.

References getRef(), and ObjectProxy().

◆ operator== [2/2]

bool operator== ( ObjectRef Ref,
const ObjectProxy & Proxy )
friend

Definition at line 361 of file ObjectStore.h.

References getRef(), and ObjectProxy().


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