class Cmpi::CMPIEnumeration
Enumeration provide a linked-list type access to multiple elements
Public Instance Methods
each() { |next_element| ... }
click to toggle source
# File cmpi.rb, line 511 def each while has_next yield next_element end end
has_next()
click to toggle source
int hasNext()
{
CMPIStatus st = { CMPI_RC_OK, NULL };
int result;
result = CMHasNext($self, &st);
RAISE_IF(st);
return result;
}
%rename("to_ary") toArray;
CMPIArray *toArray()
{
CMPIStatus st = { CMPI_RC_OK, NULL };
CMPIArray* result;
result = CMToArray($self, NULL);
RAISE_IF(st);
return result;
}
}
next_element()
click to toggle source
CMPIData next_element()
{
CMPIStatus st = { CMPI_RC_OK, NULL };
CMPIData result;
result = CMGetNext($self, &st);
RAISE_IF(st);
return result;
}
%typemap(out) int hasNext
"$result = ($1 != 0) ? Qtrue : Qfalse;";
%rename("has_next") hasNext;
int hasNext()
{
CMPIStatus st = { CMPI_RC_OK, NULL };
int result;
result = CMHasNext($self, &st);
RAISE_IF(st);
return result;
}
%rename("to_ary") toArray;
CMPIArray *toArray()
{
CMPIStatus st = { CMPI_RC_OK, NULL };
CMPIArray* result;
result = CMToArray($self, NULL);
RAISE_IF(st);
return result;
}
}
to_ary()
click to toggle source
CMPIArray *toArray()
{
CMPIStatus st = { CMPI_RC_OK, NULL };
CMPIArray* result;
result = CMToArray($self, NULL);
RAISE_IF(st);
return result;
}
}