class Cmpi::CMPIArray
Array of equally-typed elements
Public Instance Methods
at(p1)
click to toggle source
Gets an element value defined by its index.
CMPIData at(int index)
{
CMPIData result;
CMPIStatus st = { CMPI_RC_OK, NULL };
result = CMGetArrayElementAt($self, index, &st);
RAISE_IF(st);
return result;
}
%alias set "[]=";
/* Sets an element value defined by its index. */
void set(int index, const CMPIValue * value, CMPIType type)
{
RAISE_IF(CMSetArrayElementAt($self, index, value, type));
}
}
cmpi_type()
click to toggle source
Gets the element type.
CMPIType cmpi_type()
{
CMPIType result;
CMPIStatus st = { CMPI_RC_OK, NULL };
result = CMGetArrayType($self, &st);
RAISE_IF(st);
return result;
}
%alias at "[]";
/* Gets an element value defined by its index. */
CMPIData at(int index)
{
CMPIData result;
CMPIStatus st = { CMPI_RC_OK, NULL };
result = CMGetArrayElementAt($self, index, &st);
RAISE_IF(st);
return result;
}
%alias set "[]=";
/* Sets an element value defined by its index. */
void set(int index, const CMPIValue * value, CMPIType type)
{
RAISE_IF(CMSetArrayElementAt($self, index, value, type));
}
}
set(p1, p2, p3)
click to toggle source
Sets an element value defined by its index.
void set(int index, const CMPIValue * value, CMPIType type)
{
RAISE_IF(CMSetArrayElementAt($self, index, value, type));
}
}
size()
click to toggle source
int size()
{
return CMGetArrayCount($self, NULL);
}
/* Gets the element type. */
CMPIType cmpi_type()
{
CMPIType result;
CMPIStatus st = { CMPI_RC_OK, NULL };
result = CMGetArrayType($self, &st);
RAISE_IF(st);
return result;
}
%alias at "[]";
/* Gets an element value defined by its index. */
CMPIData at(int index)
{
CMPIData result;
CMPIStatus st = { CMPI_RC_OK, NULL };
result = CMGetArrayElementAt($self, index, &st);
RAISE_IF(st);
return result;
}
%alias set "[]=";
/* Sets an element value defined by its index. */
void set(int index, const CMPIValue * value, CMPIType type)
{
RAISE_IF(CMSetArrayElementAt($self, index, value, type));
}
}
to_s()
click to toggle source
const char* string()
{
const CMPIBroker* broker = cmpi_broker();
CMPIString *s = CDToString(broker, $self, NULL);
const char *result = strdup(CMGetCharPtr(s));
CMRelease(s);
return result;
}
#endif
int size()
{
return CMGetArrayCount($self, NULL);
}
/* Gets the element type. */
CMPIType cmpi_type()
{
CMPIType result;
CMPIStatus st = { CMPI_RC_OK, NULL };
result = CMGetArrayType($self, &st);
RAISE_IF(st);
return result;
}
%alias at "[]";
/* Gets an element value defined by its index. */
CMPIData at(int index)
{
CMPIData result;
CMPIStatus st = { CMPI_RC_OK, NULL };
result = CMGetArrayElementAt($self, index, &st);
RAISE_IF(st);
return result;
}
%alias set "[]=";
/* Sets an element value defined by its index. */
void set(int index, const CMPIValue * value, CMPIType type)
{
RAISE_IF(CMSetArrayElementAt($self, index, value, type));
}
}