#include "nusmv/core/rbc/rbc.h"
#include "nusmv/core/utils/utils.h"
Go to the source code of this file.
Defines | |
#define | INLINE_RESULT(self) ((InlineResult_ptr) self) |
To cast and check instances of class InlineResult. | |
#define | INLINE_RESULT_CHECK_INSTANCE(self) (nusmv_assert(INLINE_RESULT(self) != INLINE_RESULT(NULL))) |
Typedefs | |
typedef struct InlineResult_TAG * | InlineResult_ptr |
Functions | |
InlineResult_ptr | InlineResult_ref (InlineResult_ptr self) |
#define INLINE_RESULT | ( | self | ) | ((InlineResult_ptr) self) |
To cast and check instances of class InlineResult.
These macros must be used respectively to cast and to check instances of class InlineResult
#define INLINE_RESULT_CHECK_INSTANCE | ( | self | ) | (nusmv_assert(INLINE_RESULT(self) != INLINE_RESULT(NULL))) |
typedef struct InlineResult_TAG* InlineResult_ptr |
InlineResult_ptr InlineResult_ref | ( | InlineResult_ptr | self | ) |
Use when you need to store self in a cache.
This sets internal counter to count the number of instances of self, to avoid wrong destruction. Use only when you know what you are doing, for example if self must be returned by a function whose caller takes the owner, but self gets also stored within a cache by the callee function.
If used improperly, the instance will not be freed propertly, resulting in a leak.
Returns self, so it can be used in expressions (e.g. in return).