C - Object next

From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 18-Nov-2017 00:11 UTC

C - Object next

Get the handle of the next dynamically created instance

Contents

Synopsis

 
 
 
#include <«pkg»/«Mod».h> 
 
«Mod»_Handle «Mod»_Object_next(«Mod»_Handle handle);

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 next 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_next() and must be accessed via «Mod»_Object_get().

See also

C - Object_first Get the handle of the first 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 18-Nov-2017 00:11 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved
Personal tools
package reference