Esempio n. 1
0
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);
  }
Esempio n. 2
0
  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 );
  }
Esempio n. 3
0
globle void FactSlotNames(
  void *vTheFact,
  DATA_OBJECT *returnValue)
  {
   EnvFactSlotNames(GetCurrentEnvironment(),vTheFact,returnValue);
  }