globle void FactSlotNamesFunction( void *theEnv, DATA_OBJECT *returnValue) { struct fact *theFact; /*=============================================*/ /* Set up the default return value for errors. */ /*=============================================*/ returnValue->type = SYMBOL; returnValue->value = EnvFalseSymbol(theEnv); /*============================================*/ /* Check for the correct number of arguments. */ /*============================================*/ if (EnvArgCountCheck(theEnv,"fact-slot-names",EXACTLY,1) == -1) return; /*================================*/ /* Get the reference to the fact. */ /*================================*/ theFact = GetFactAddressOrIndexArgument(theEnv,"fact-slot-names",1,TRUE); if (theFact == NULL) return; /*=====================*/ /* Get the slot names. */ /*=====================*/ EnvFactSlotNames(theEnv,theFact,returnValue); }
std::vector<std::string> Fact::slot_names() { DATA_OBJECT clipsdo; if ( !m_cobj ) return std::vector<std::string>(); EnvFactSlotNames( m_environment.cobj(), m_cobj, &clipsdo ); return data_object_to_strings( clipsdo ); }
globle void FactSlotNames( void *vTheFact, DATA_OBJECT *returnValue) { EnvFactSlotNames(GetCurrentEnvironment(),vTheFact,returnValue); }