Select to view content in your preferred language

Class & Coclass

1895
3
12-20-2010 06:56 AM
Gautham_SChejarla
Emerging Contributor
Can anybody please give me a clear idea about the difference between Class & CoClass and Inbound & Outbound Interfaces. Thanks in advance.
0 Kudos
3 Replies
GregRieck
Frequent Contributor
Hello,

Please see the following links:

http://forums.esri.com/Thread.asp?c=93&f=993&t=87924

Here is the updated ArcObjects Introduction to COM for ArcObjects link mentioned in the above URL.
http://forums.esri.com/Thread.asp?c=93&f=993&t=87924
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Introduction_to_COM_for...



Greg
0 Kudos
Venkata_RaoTammineni
Regular Contributor
Can anybody please give me a clear idea about the difference between Class & CoClass and Inbound & Outbound Interfaces. Thanks in advance.


Objects and Classes
ArcObjects consists of objects and classes.
3
An
object
represents a spatial feature such
as a road or a vegetation stand. In a geodatabase, an object corresponds to a row in a
table and the object�??s attributes appear in columns. A
class
is a set of objects with similar
attributes. An ArcObjects class can have built-in interfaces, properties, and methods.
ArcObjects includes three types of classes:
The most common type is the coclass. A
coclass
can be used to create new objects.
For example,
FeatureClass
is a coclass that allows new feature class objects to be
created as instances of the coclass.
The second type is the abstract class. An
abstract
class cannot be used to create new
objects, but it exists so that other classes (i.e., subclasses) can use or share the
properties and methods that the class supports. For example,
GeoDataset
is an
abstract class. The class exists so that geographic datasets such as feature classes
and raster datasets can all share the properties of extent and spatial reference that
the
GeoDataset
class supports.

The third type is the class. A
class
cannot be used directly to create new objects;
instead, objects of a class can only be created from another class. For example,
EnumInvalidObject
is a noncreatable class because an
EnumInvalidObject
can only
be obtained from another object such as a data conversion object. When converting
a shapefile from one coordinate system to another, for example, a data conversion
object automatically creates an
EnumInvalidObject
to keep track of those objects
that have failed to be converted
0 Kudos
AlexanderGray
Honored Contributor
A CoClass is a class you can cocreate or instantiate calling the constructor (new.)  A class in ArcObjects lingo is a class that cannot be cocreated.  An inbound interface is a regular interface where calls executes code inside the class.  The call is made from outside the class to execute code inside the class (inbound.)  An outbound interface is an event interface, where events are raised by the class and invoke the event listener code outside of the class (code inside the class triggers code outside the class, outbound).
0 Kudos