System


Supported with:
  • Engine
  • ArcView
  • ArcEditor
  • ArcInfo
  • Server
Library dependencies: none

Additional library information: Contents, Object Model Diagram

The System library is the lowest level library in the ArcGIS architecture. The library contains components that expose services used by the other libraries composing ArcGIS. There are a number of interfaces defined in the System library that can be implemented by the developer.

The System library contains the important AoInitialize object; use this object to initialize and uninitialize the ArcGIS Engine in applications that make use of ArcGIS Engine functionality. The developer does not extend the System library but can extend the ArcGIS system by implementing interfaces contained in this library.

The System library contains many diverse objects with unrelated functionality; however there are some areas of functionality that can be grouped into subsystems.

See the following sections for more information about this namespace:

Array and set objects

The array and set objects act as containers for collections of other objects and values and are used throughout ArcObjects. The LongArray, DoubleArray, StrArray, and FileNames objects store collections of specific kinds of data; that is, they are homogenous collections.
The Array, Set, Property Set, and VarArray objects store heterogeneous data. Array and Set hold collections of objects, although for a Set, an object can only be a member once. PropertySet is a keyed collection of objects or values. A VarArray is a collection of variants and thus can hold a variety of data. See the following illustration:

Extension objects

Extensions provide the developer with a powerful mechanism for extending the core functionality of the ArcGIS applications. An extension can provide a toolbar with new tools, listen for and respond to events, perform feature validation, and so on.
Extensions act as a central point of reference for developers when they are creating commands and tools for use within the applications. Often these commands and tools must share data or access common user interface (UI) components.
An extension is the logical place to store this data and develop the UI components. The main reason for this is that there is only one instance of an extension per running application and given an IApplication interface or with the ExtensionManager object, it is always possible to locate the extension and work with it. See the following illustration:
The ExtensionManager object is designed to allow you to enable licensed extensions, such as 3D Analyst, in your stand-alone application. Being a singleton object, ExtensionManager is the one and only instance of its class. An application can have only one ExtensionManager object. See the following illustration:

Stream objects

When implementing objects, you may need to provide support for persistence. For example, with a custom feature renderer, persistence enables its settings to be written to a .mdx file so when an ArcGIS Engine application is restarted, the layer having custom rendering is drawn in the same way as previously drawn. The Component Object Model (COM) concept of streams provides a way of reading and writing data to the persisted storage.
To provide persistence support for your custom object, implement one or both of IPersistStream and IPersistVariant. You can consume these interfaces on existing objects, particularly in your persistence implementation of your custom object. However, consider the use of an ObjectStream class in this situation.
ArcObjects defines some specific stream objects that you will find useful in persisting data. Each one implements the standard ISequentialStream and IStream COM interfaces. The MemoryBlobStream provides storage for binary data in memory. It is particularly useful for writing arbitrary data to databases. The ObjectStream is used in conjunction with another stream to persist ESRI objects. A FileStream is a specialized kind of stream for reading and writing files. An XMLStream supports reading and writing Extensible Markup Language (XML) from files, strings, and binary buffers.
The following are the two stream helper objects:
  • ByteSwapStreamIO helps convert the byte order of data, for example, from big endian to little endian. This can be important for programs that need to work on both Windows and UNIX systems.
  • VariantStreamIO provides help for reading and writing variants to and from streams.
See the following illustration:

Component categories

Component categories are used by client applications to find all components of a particular type that are installed on the system. For example, ArcMap only supports commands that implement the ICommand interface. A component category—ESRI Mx Commands—is used to find all the command components that can be used inside ArcMap. If component categories were not used, the application would have to instantiate each COM component and interrogate it to see if it supported the required functionality, which is not a practical approach.
Component categories support the extensibility of COM by allowing the developer of the client application to create and work with classes that belong to a particular category. If a new class is later added to the category, the client application need not be changed to take advantage of the new class; it will automatically pick up the new class the next time the category is read.
The ComponentCategoryManager object lets you add or remove components from categories and create new categories.
The CategoryFactory object is used to read the information in the registry to find out what classes are in a particular category. It can be used to instantiate an object from each class registered to a component category.

XML objects

The XML objects are used for reading and writing XML documents in a forward only manner. See the following illustration:
 
Basic XML
The XMLStream object is an in-memory buffer that supports reading and writing XML from files, strings, and binary buffers. The stream is written to or read from by the XMLWriter and XMLReader objects. When reading or writing XML elements, you can represent the attributes and namespace declarations of an XML element with the XMLAttributes and XMLNamespaces classes. The XMLTypeMapper class converts native types to XML Schema simple types.

XML serialization

The XMLSerialization class serializes and deserializes ArcObjects that support IXMLSerialize. When using XMLSerializer, you can specify serialization flags with the XMLFlags class. The wrapper object XMLPersistedObject is used with XMLSerializer to serialize and deserialize ArcObjects that support IPersistStream.

Classify objects

This group of closely related objects can be used to group numeric values into classes. The following are the types of classification objects:
Classification objects take histogram data (values and frequencies) and given a desired number of classes, compute appropriate break values between the classes. The breaks are in increasing value and except for the first break, represent the highest value in the class.
The range of values that a class covers can vary; this range is the class's interval. If the values were from the attribute values of a feature layer, after determining the class breaks, you would typically set up a ClassBreaksRenderer. Also, the task of gathering the values and frequency counts from an attribute field can be made easier by using the TableHistogram object to retrieve the histogram data.
TableHistogram is defined in the CartoUI library. The histogram data is in the form of two arrays. The first of these is a sorted array of numeric values and the second is a corresponding array of frequency counts of the values. See the following illustration:
The following discusses the usage of different classify objects:

DefinedInterval

The following illustration uses a defined interval classification to show average house prices in different counties. The interval is $50,000 and the class breaks are multiples of this amount.

EqualInterval

The following illustration shows areas where there are differing populations of infants relative to the population of the area. It is produced using an equal interval classification where the minimum is 3 percent of the population under five and in bands of 3 percent, shows increasing numbers under five (up to 18 percent of the population).

NaturalBreaks

The following illustration shows classes divided by the Jenks method into natural intervals. Since 6 to 8 percent of the population are infants under five, this range has been split into two classes. Conversely, in only a few areas are infants more than 10 percent of the population, hence one class covers 10 to 18 percent.

Quantile

The following illustration shows classes that contain equal numbers of features from the quantile classification:

StandardDeviation

The following illustration shows classes generated by the standard deviation classification. The class breaks are generated by successively adding or subtracting the standard deviation from the mean. A two color ramp helps emphasize values above (shown in blue) and below (shown in red) the mean.


NumberFormat objects

The number format objects convert numerical values into strings and strings into numerical values. This conversion is dependent on the coclass used and the property settings of the interfaces on those classes. See the following illustration: