bool 
StatusReporterInterface::BuildYourselfFromYourValueSet( ValueSet &vs ){

	int		rc = 1;

	rc &= vs.GetInt( SSAPI_OBJECT_FID_STATE, &m_state );
	rc &= vs.GetU32( SSAPI_OBJECT_FID_STATE_STRING, &m_stateString );

	return rc? true : false;
}
Пример #2
0
bool
IntVectorFilter::BuildYourselfFromAValueSet( ValueSet &valueSet ) {

    int			comparatorType, index;
    ValueSet	*pValueVector;
    bool		rc;
    I64			*pValue, value;

    rc = Filter::BuildYourselfFromAValueSet( valueSet );

    ClearValueVector();
    delete m_pComparator;

    valueSet.GetInt( SSAPI_INT_FLOAT_VECTOR_FILTER_FID_FIELD_ID, &m_fieldId );
    valueSet.GetInt( SSAPI_INT_FLOAT_VECTOR_FILTER_FID_COMPARATOR_TYPE, &comparatorType );
    m_pComparator = new Comparator( (Comparator::COMPARATOR_TYPE)comparatorType );

    pValueVector	= (ValueSet *)valueSet.GetValue( SSAPI_INT_FLOAT_VECTOR_FILTER_FID_VALUE_VECTOR );

    if( !pValueVector )
        return false;

    for( index = 0; index < pValueVector->GetCount(); index++ ) {
        if( !pValueVector->GetInt64( index, &value ) ) {
            int i;
            if( !pValueVector->GetInt( index, (int *)&i) )
                return false;
            else
                value = i;
        }

        pValue = new I64;
        *pValue = value;
        m_pValueVector->AddAt( (CONTAINER_ELEMENT)pValue, index );
    }

    return rc;
}
Пример #3
0
bool 
Filter::BuildYourselfFromAValueSet( ValueSet &valueSet ){

	return valueSet.GetInt( SSAPI_FILTER_FID_FILTER_CLASS_TYPE, (int *)&m_filterClassType )? true : false;
}