From RTSC-Pedia
revision tip
LANDSCAPE orientation[printable version] [offline version] | offline version generated on 25-Jun-2010 20:06 UTC |
C - Object first
Get the handle of the first dynamically created instance
Contents |
Synopsis
| #include <«pkg»/«Mod».h> «Mod»_Handle «Mod»_Object_first(void); |
Description
This function is automatically defined for all target modules that support instances, where «Mod» is the name of some module. This function is typically used in situations where the Mod needs to loop over all dynamically created instances. This function returns the the first dynamically-created instance object, or NULL.
| «Mod»_Handle obj; /* loop over all runtime created instances managed by «Mod» */ for (obj = «Mod»_Object_first(); obj != NULL; obj = «Mod»_Object_next(obj)) { : /* use «Mod»_handle obj */ } |
Statically created instances are not returned by «Mod»_Object_first() or «Mod»_Object_next() and must be accessed via «Mod»_Object_get().
See also
C - Object_next | Get the handle of the next dynamically created instance |
C - Object_count | Get the number of statically created instances |
C - Object_get | Get the instance handle of a statically created instance |
[printable version] [offline version] | offline version generated on 25-Jun-2010 20:06 UTC |
Copyright © 2008 The Eclipse Foundation. All Rights Reserved