if (name_declared("pkgversions") != 4 ) { execute("strdef pkgversions") }
sprint(pkgversions,"%sObjectClass = $Revision: 1.1 $, ",pkgversions)
//
// object_is(objref obj, String classname)
//
begintemplate ObjectClass
public object_is, object_name
strdef tmpstr, objclass
objref sf
proc init() {
sf = new StringFunctions()
}
proc object_name() {
sprint(tmpstr,"%s",$o1)
print tmpstr
print $o1
}
func object_is() { local ind
sprint(tmpstr,"%s",$o1)
if (!strcmp(tmpstr,"NULLobject")) {
objclass = tmpstr
} else {
sf.head(tmpstr,"\[[0-9]",objclass)
}
return !strcmp(objclass,$s2)
}
endtemplate ObjectClass