version 1.2, 2015/04/20 18:10:09
|
version 1.3, 2015/04/20 18:19:49
|
|
|
| |
#include "config.h" | #include "config.h" |
#include <common.h> | #include <common.h> |
#include "atomic.h" |
#include <pal/atomic.h> |
#include "batch.h" | #include "batch.h" |
#include "buf.h" | #include "buf.h" |
| |
|
|
MI_Uint32 magic; | MI_Uint32 magic; |
union | union |
{ | { |
AtomicInt refs; |
volatile ptrdiff_t refs; |
MI_Uint64 alignment; | MI_Uint64 alignment; |
} | } |
u; | u; |
|
|
MI_ClassDecl* classDecl; | MI_ClassDecl* classDecl; |
| |
/* The optional server name (inherited field) */ | /* The optional server name (inherited field) */ |
MI_Char* serverName; |
ZChar* serverName; |
| |
/* The optional namespace (inherited field) */ | /* The optional namespace (inherited field) */ |
MI_Char* nameSpace; |
ZChar* nameSpace; |
| |
/* Allocator for this instance */ | /* Allocator for this instance */ |
Batch* batch; | Batch* batch; |
|
|
Batch* batch); | Batch* batch); |
| |
MI_Result Instance_New( | MI_Result Instance_New( |
MI_Instance** self, |
_Outptr_ MI_Instance** selfOut, |
const MI_ClassDecl* classDecl, |
_In_ const MI_ClassDecl* classDecl, |
Batch* batch); |
_In_opt_ Batch* batch); |
| |
MI_Result MI_CALL Instance_NewDynamic( | MI_Result MI_CALL Instance_NewDynamic( |
MI_Instance** self, |
_Outptr_ MI_Instance** self, |
const MI_Char* className, |
_In_z_ const ZChar* className, |
MI_Uint32 metaType, /* MI_FLAG_(CLASS|ASSOCIATION|INDICATION|METHOD) */ | MI_Uint32 metaType, /* MI_FLAG_(CLASS|ASSOCIATION|INDICATION|METHOD) */ |
Batch* batch); |
_In_opt_ Batch* batch); |
| |
/* TODO: Set MI_ClassDecl.schema during generation; eliminate schemaDecl arg */ | /* TODO: Set MI_ClassDecl.schema during generation; eliminate schemaDecl arg */ |
MI_Result MI_CALL Instance_InitConvert( | MI_Result MI_CALL Instance_InitConvert( |
MI_Instance* self, |
_In_ MI_Instance* self, |
const MI_ClassDecl* classDecl, |
_In_ const MI_ClassDecl* classDecl, |
const MI_Instance* instance, |
_In_ const MI_Instance* instance, |
MI_Boolean keysOnly, | MI_Boolean keysOnly, |
MI_Boolean allowKeylessInst, | MI_Boolean allowKeylessInst, |
MI_Boolean copy, | MI_Boolean copy, |
Batch* batch); |
_In_opt_ Batch* batch, |
|
MI_Uint32 flags); |
| |
MI_Result MI_CALL Instance_Clone( | MI_Result MI_CALL Instance_Clone( |
const MI_Instance* self, | const MI_Instance* self, |
|
|
| |
MI_Result MI_CALL Instance_SetClassName( | MI_Result MI_CALL Instance_SetClassName( |
MI_Instance* self, | MI_Instance* self, |
const MI_Char* className); |
const ZChar* className); |
| |
MI_Result MI_CALL Instance_Print( | MI_Result MI_CALL Instance_Print( |
const MI_Instance* self, | const MI_Instance* self, |
FILE* os, | FILE* os, |
MI_Uint32 level, | MI_Uint32 level, |
MI_Boolean showNulls); |
MI_Boolean showNulls, |
|
MI_Boolean isClass); |
| |
/* Return true if instances have exactly the same keys */ | /* Return true if instances have exactly the same keys */ |
MI_Boolean Instance_MatchKeys( | MI_Boolean Instance_MatchKeys( |
const MI_Instance* self, | const MI_Instance* self, |
const MI_Instance* instance); | const MI_Instance* instance); |
| |
|
/* Get underline instance */ |
|
Instance* Instance_GetSelf( |
|
const MI_Instance* self); |
|
|
|
MI_Result Instance_SetElementArrayItem( |
|
_Out_ MI_Instance* self_, |
|
MI_Uint32 elementId, |
|
MI_Value value); |
|
|
|
MI_Result Instance_SetElementArray( |
|
_Out_ MI_Instance* self_, |
|
_In_z_ const MI_Char* name, |
|
MI_Type type, |
|
MI_Uint32 flags, |
|
MI_Uint32 numberArrayItems, |
|
_Out_ MI_Uint32 *elementId |
|
); |
|
|
|
MI_Boolean Instance_IsDynamic( |
|
_In_ MI_Instance *self_); |
|
|
|
/* Verify all Keys are non-NULL */ |
|
MI_Boolean Instance_ValidateNonNullKeys( |
|
const MI_Instance* self); |
|
|
/* | /* |
**============================================================================== | **============================================================================== |
** | ** |
|
|
| |
void __MI_Instance_Unref(MI_Instance* self); | void __MI_Instance_Unref(MI_Instance* self); |
| |
|
MI_ClassDecl* _CloneClassDecl( |
|
const MI_ClassDecl* cd, |
|
Batch* batch); |
|
|
|
|
MI_Result MI_CALL __MI_Instance_Clone( | MI_Result MI_CALL __MI_Instance_Clone( |
const MI_Instance* self, | const MI_Instance* self, |
MI_Instance** inst); | MI_Instance** inst); |
|
|
| |
MI_Result MI_CALL __MI_Instance_GetClassName( | MI_Result MI_CALL __MI_Instance_GetClassName( |
const MI_Instance* self_, | const MI_Instance* self_, |
const MI_Char** classname); |
const ZChar** classname); |
| |
MI_Result MI_CALL __MI_Instance_SetNameSpace( | MI_Result MI_CALL __MI_Instance_SetNameSpace( |
MI_Instance* self, | MI_Instance* self, |
const MI_Char* nameSpace); |
const ZChar* nameSpace); |
| |
MI_Result MI_CALL __MI_Instance_GetNameSpace( | MI_Result MI_CALL __MI_Instance_GetNameSpace( |
const MI_Instance* self, | const MI_Instance* self, |
const MI_Char** nameSpace); |
const ZChar** nameSpace); |
| |
MI_Result MI_CALL __MI_Instance_GetElementCount( | MI_Result MI_CALL __MI_Instance_GetElementCount( |
const MI_Instance* self, | const MI_Instance* self, |
|
|
| |
MI_Result MI_CALL __MI_Instance_AddElement( | MI_Result MI_CALL __MI_Instance_AddElement( |
MI_Instance* self, | MI_Instance* self, |
const MI_Char* name, |
const ZChar* name, |
const MI_Value* value, | const MI_Value* value, |
MI_Type type, | MI_Type type, |
MI_Uint32 flags); | MI_Uint32 flags); |
| |
MI_Result MI_CALL __MI_Instance_SetElement( | MI_Result MI_CALL __MI_Instance_SetElement( |
MI_Instance* self, | MI_Instance* self, |
const MI_Char* name, |
const ZChar* name, |
const MI_Value* value, | const MI_Value* value, |
MI_Type type, | MI_Type type, |
MI_Uint32 flags); | MI_Uint32 flags); |
|
|
| |
MI_Result MI_CALL __MI_Instance_GetElement( | MI_Result MI_CALL __MI_Instance_GetElement( |
const MI_Instance* self, | const MI_Instance* self, |
const MI_Char* name, |
const ZChar* name, |
MI_Value* valueOut, | MI_Value* valueOut, |
MI_Type* typeOut, | MI_Type* typeOut, |
MI_Uint32* flagsOut, | MI_Uint32* flagsOut, |
|
|
MI_Result MI_CALL __MI_Instance_GetElementAt( | MI_Result MI_CALL __MI_Instance_GetElementAt( |
const MI_Instance* self, | const MI_Instance* self, |
MI_Uint32 index, | MI_Uint32 index, |
const MI_Char** name, |
const ZChar** name, |
MI_Value* value, | MI_Value* value, |
MI_Type* type, | MI_Type* type, |
MI_Uint32* flags); | MI_Uint32* flags); |
| |
MI_Result MI_CALL __MI_Instance_ClearElement( | MI_Result MI_CALL __MI_Instance_ClearElement( |
MI_Instance* self_, | MI_Instance* self_, |
const MI_Char* name); |
const ZChar* name); |
| |
MI_Result MI_CALL __MI_Instance_ClearElementAt( | MI_Result MI_CALL __MI_Instance_ClearElementAt( |
MI_Instance* self, | MI_Instance* self, |
MI_Uint32 index); | MI_Uint32 index); |
| |
MI_Result MI_CALL __MI_Instance_Print( |
|
const MI_Instance* self, |
|
FILE* os, |
|
MI_Uint32 level); |
|
|
|
extern MI_InstanceFT __mi_instanceFT; | extern MI_InstanceFT __mi_instanceFT; |
| |
|
MI_Result MI_CALL MI_Instance_GetClassExt( |
|
_In_ const MI_Instance *self, |
|
_Inout_ MI_Class* classToGet); |
|
|
END_EXTERNC | END_EXTERNC |
| |
#endif /* _omi_instance_h */ | #endif /* _omi_instance_h */ |