parcel | Clownfish |
class variable | CFISH_OBJ |
struct symbol | cfish_Obj |
class nickname | cfish_Obj |
header file | Clownfish/Obj.h |
Clownfish::Obj – Base class for all objects.
cfish_Obj*
cfish_Obj_init(
cfish_Obj *self
);
Abstract initializer.
cfish_Class*
cfish_Obj_get_class(
cfish_Obj *self
);
Return the object’s Class.
cfish_String*
cfish_Obj_get_class_name(
cfish_Obj *self
);
Return the name of the class that the object belongs to.
bool
cfish_Obj_is_a(
cfish_Obj *self,
cfish_Class *ancestor
);
Indicate whether the object is a descendent of ancestor
.
cfish_Obj* // incremented
cfish_Obj_Clone(
cfish_Obj *self
);
Return a clone of the object.
bool
cfish_Obj_Equals(
cfish_Obj *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
int32_t
cfish_Obj_Compare_To(
cfish_Obj *self,
cfish_Obj *other
);
Indicate whether one object is less than, equal to, or greater than another.
Another Obj.
Returns: 0 if the objects are equal, a negative number if
self
is less than other
, and a positive
number if self
is greater than other
.
cfish_String* // incremented
cfish_Obj_To_String(
cfish_Obj *self
);
Generic stringification: “ClassName@hex_mem_address”.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.