Exemple #1
0
void _destroyCDKObject (CDKOBJS *obj)
{
   ALL_OBJECTS *p, *q;

   if (validCDKObject (obj))
   {
      for (p = all_objects, q = 0; p != 0; q = p, p = p->link)
      {
	 if (p->object == obj)
	 {
	    /* delink it first, to avoid problems with recursion */
	    if (q != 0)
	       q->link = p->link;
	    else
	       all_objects = p->link;

	    MethodPtr (obj, destroyObj) (obj);
	    free (obj);
	    free (p);
	    break;
	 }
      }
   }
}
Exemple #2
0
MethodPtr Class::GetMethod(const std::string &methodName) const
{
	methods_t::const_iterator iter = methods.find(methodName);
	return (iter == methods.end()) ? MethodPtr() : iter->second;
}