BSharedObject Class Reference
[Binder]

#include <support/Package.h>

Inheritance diagram for BSharedObject:

SAtom BProcess::ComponentImage List of all members.

Detailed Description

A representation of a loaded executable image.


Public Member Functions

 BSharedObject (const SValue &src, const SPackage &package, attach_func attach=NULL)
 Create a new BSharedObject, loading file as an add-on.
void Detach ()
 Detach this BSharedObject from the image it loaded.
SString File () const
 Deprecated -- used Source() instead.
status_t GetSymbolAt (int32_t index, SString *outName, int32_t *outSClass, void **outPtr) const
 Look up a symvol in the image by index.
status_t GetSymbolFor (const char *name, int32_t sclass, void **outPtr) const
 Look up a symbol in the image by name.
image_id ID () const
 Return the image_id this object is for.
SPackage Package ()
SValue Source () const
 Return source of this image.

Protected Member Functions

virtual void InitAtom ()
 Called the first time a strong reference is acquired. All significant object initialization should go here.
virtual ~BSharedObject ()


Constructor & Destructor Documentation

BSharedObject const SValue src,
const SPackage package,
attach_func  attach = NULL
 

Create a new BSharedObject, loading file as an add-on.

The image will be unloaded when the BSharedObject is destoyed.

~BSharedObject  )  [protected, virtual]
 


Member Function Documentation

void Detach  ) 
 

Detach this BSharedObject from the image it loaded.

This makes it so that any future SPackageSptr instantations in the image's code will fail, so that (eventually) all weak references on the image can go away.

SString File  )  const
 

Deprecated -- used Source() instead.

status_t GetSymbolAt int32_t  index,
SString outName,
int32_t *  outSClass,
void **  outPtr
const
 

Look up a symvol in the image by index.

See also:
get_nth_image_symbol()

status_t GetSymbolFor const char *  name,
int32_t  sclass,
void **  outPtr
const
 

Look up a symbol in the image by name.

See also:
get_image_symbol()

image_id ID  )  const
 

Return the image_id this object is for.

The given image will never be unloaded.

void InitAtom  )  [protected, virtual]
 

Called the first time a strong reference is acquired. All significant object initialization should go here.

You can override it and do any setup you need. Note that you do not need to call the SAtom implementation. (So you can derive from two different SAtom implementations and safely call down to both of their IncStrong() methods.)

See also:
IncStrong()

Reimplemented from SAtom.

Reimplemented in BProcess::ComponentImage.

SPackage Package  )  [inline]
 

SValue Source  )  const
 

Return source of this image.


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