Next: , Previous: Getting the Version of the Library, Up: Introduction


1.12 Object Handles

In the QSMM API, to refer to various objects handles are used. A handle is an opaque typed pointer to a QSMM internal structure, the contents of which cannot be examined or changed by an application program, except via API functions that take a handle of that type as an argument. The type of a handle corresponds to the type of an object the handle refers to. Dereferencing handles is useless, as they all have incomplete types. Because a handle is a pointer, it can have the NULL value. The table below lists handle types used in the QSMM API, corresponding object types, and references to sections in this manual with detailed descriptions of those handle types.

Handle Type Object Type Reference to a Section in this Manual


qsmm_t multinode model Creating a Multinode Model.


qsmm_actor_t actor Basic Datatypes and Macros.


qsmm_actpair_t actor pair Creating the Model Instance.


qsmm_instr_t assembler instruction Basic Datatypes.


qsmm_iter_t map iterator Part of the C implementation of functionality of STL map and multimap templates. See Creating Maps and Iterators.


qsmm_map_t map Part of the C implementation of functionality of STL map and multimap templates. See Creating Maps and Iterators.


qsmm_msg_t message Creating Messages.


qsmm_msglist_t message list Creating a Message List.


qsmm_prg_t assembler program Basic Datatypes.


qsmm_rng_t random number generator Creating a Random Number Generator.


qsmm_side_t interaction side Part of the Side API. See Registering Interaction Sides.


qsmm_storage_t statistics storage Types of Storage.


qsmm_vec_t vector Ordinary and Sparse Vectors.

In a multithreaded program, it is generally acceptable to use different handles in different threads concurrently on condition that the handles are not interrelated. The handles are interrelated e.g. in a situation when one handle refers to a component of an object referred to by another handle.