SAF User Manual
latest
  • Sets and Fields (SAF) API
  • SAF Examples
  • SAF Support Library
    • Table of Contents
      • Introduction [chapter]
      • Library [chapter]
      • Environment_Variables [chapter]
      • Error_Handling [chapter]
      • Magic_Numbers [chapter]
      • Properties [chapter]
      • Persistent_Objects [chapter]
        • Members
      • Persistent_Object_Tables [chapter]
      • Strings [chapter]
      • Variable_Length_Arrays [chapter]
      • Files [chapter]
      • Global_File_Information [chapter]
      • Scopes [chapter]
      • Object_Attributes [chapter]
      • Values [chapter]
      • HDF5 [chapter]
      • Datatypes [chapter]
      • Miscellaneous [chapter]
      • Notes [chapter]
      • Debugging [chapter]
      • Overloaded_Definitions [chapter]
      • Permuted_Index [chapter]
SAF User Manual
  • Docs »
  • SAF Support Library (SSlib) Programming Reference Manual for SAF 2.0.0 and later »
  • Persistent Objects »
  • Dereference an object link
  • Edit on GitHub

Dereference an object link¶

ss_pers_deref is a function defined in sspers.c.

Synopsis:

ss_persobj_t * ss_pers_deref(ss_pers_t *pers)¶

Description: Given a link to a persistent object, dereference that link and return a pointer to the object itself. This may involve reading a table into memory if this is the first dereference into that table.

This function is almost never invoked directly by client code. Instead, the client will use macros appropriate for each object class which will check the link class and cast the return value to the appropriate type. For instance, SS_FIELD is a macro that takes a field object link as an argument, compile-time checks that the argument is an ss_field_t pointer, run-time check that the pointer is valid, and return an ss_fieldobj_t pointer.

Return Value: Returns an object pointer on success; the null pointer on failure.

Parallel Notes: Independent

Issues: We should probably accumulate some sort of statistics here to make sure that the object caching is performing as expected.

See Also:

  • Persistent Objects: Introduction for current chapter
Next Previous

© Copyright 2005-07-01, Sandia proj 28462, 002008MLTPL00, OSTI: 1230929. This documentation was automatically generated via Robb Matzke's Mkdoc Revision 565d7697.

Built with Sphinx using a theme provided by Read the Docs.