Reprinted-Object Model diagram [OMD] reading guide

Source: Internet
Author: User

Several concepts are added:
UML: Unified Modeling Language: unified modeling language. It is a language used to visually model software-intensive systems. UML is a standard language used to describe, visualize, and document products of object-oriented development systems.
OMD: Object model diagrams object model chart.

First, let's take a look at what OMD can do for us?
1. What interfaces does this class support;
2. What objects are required to complete the task;
3. How to Use objects of this class;
4. Can classes be directly instantiated;
5. Methods and attributes of interfaces;
6. Whether other classes support this interface;
7. Relationship between objects

The following figure shows the key of the Object Model graph that runs through this book.

These symbols are created based on UML drawing tools, and UML symbols are industrial Drawing Standards for Object-Oriented Analysis and Design.

The object model graph provides a lot of information, which is an important supplement to the information in the Object Browser. All classes and members are listed in Visual Basic or other development environments, but the relationship between these classes is not specified. Therefore, the object model graph is very helpful for readers to understand the ArcInfo component!

This book uses UML to describe the ArcInfo component, that is, ArcObjects, and describe the data model you can create.

The following is a detailed description.

1.Class and Object

In the UML diagram, there are three types of classes: abstract class, createable class, And instantiable class ).

Abstract classes cannot be used to create new objects, but can be used to specify subclasses. For example, "line" is an abstract class of "primaryline" and "secondary line.

You can create a class by using the object definition syntax in the development environment. For example, in Visual Basic, dim as new <Object> or Createobject <Object> is written as follows.

The instantiated class cannot directly create new objects, but the objects of this type can be created as attributes of other objects or from methods of other classes. ------ Hard to understand.

2.Association

There are several associations (or links) between an abstract class, a class that can be created, and a class that can be instantiated ).

Association)Describes the associations between classes. You can define the multiplicity Association in the classes at both ends.

Type inheritance)Specialized classes are defined. They have super class attributes and methods, and their own attributes and methods.

Instantiation)This method is used to specify an object of A Class. It can create an object of another class.

Aggregation)Is an asymmetric association method. In this way, the object of the next class is considered as a "whole", and the object of the other class is considered as a "component ".

Composition)It is a stronger aggregation method. In this way, the "whole" object controls the survival time of "partial" objects.

After installing AE, we can find the AE OMD diagram in the relevant directory,
GenerallyInstallation directory under "Development Kit" Diagrams

Where
OMDSymbol in:
A triangle symbol represents inheritance
The Black Blocks of diamond form
The front of the dotted line carries an arrow to create
* 1: N
A straight line indicates Union

Category:
Abstract class: it cannot be created or instantiated. It never has an instance of an abstract class.
Defines the public interfaces of sub-classes. sub-classes inherit the interfaces defined by them.
The OMD symbol is a two-dimensional rectangle with a shadow inside.
Instantiation class: it cannot be created and an instance is obtained from another object.
The OMD symbol is: no shadow inside the 3D rectangle.
Class that can be created: use the new keyword to create an object or get a running instance from another object.
The OMD symbol is a shadow 3D rectangle symbol.

Attributes and methods:
Properties: dumbbell-like icon, read (left-side dumbbell) and write (right-side dumbbell)
Method: arrow to the left
Interface: lollipop icon
Connection between charts: Wormhole


I personally think it is hard to understand in the OMD diagram that the class can be instantiated. I have made the following example to understand it:

ArcengineWorkspace is an instantiated class,
The workspace cannot be created with new, but can be created using workspacefarctory. openfromfile () as follows:

Iworkspacefactory pworkspacefactory =NewAccessworkspacefactoryclass ();
IworkspacePworkspace = pworkspacefactory. openfromfile (connectionstring, 0 );

But when we try to use new to create a workspace class, it is as follows:

Iworkspace pworkspace = new workspaceclass ();
The following error occurs:
"Type" ESRI. ArcGIS. Geodatabase. workspaceclass does not define constructors;

Therefore, the main difference between class and coclass is that coclass is a class with constructor, so that it can directly create objects using new.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.