NCL Home > Documentation > HLUs > Classes

DataComm class

The DataComm class provides the functionality for its subclasses to communicate with DataItem objects.


Header file:		ncarg/hlu/DataComm.h
Class name:		dataCommClass
Class pointer:		<Not referenceable>
Fortran class function:	<Not referenceable>
Superclass:		Transform
Composite classes:	<None>

Class-defined types

Type name:		NhlTLevelSelectionMode
typedef enum _NhlLevelSelectionMode { 
	NhlAUTOMATICLEVELS	= 0,	/* "AutomaticLevels"	*/
	NhlMANUALLEVELS		= 1,	/* "ManualLevels"	*/
	NhlEXPLICITLEVELS	= 2,	/* "ExplicitLevels"	*/
	NhlEQUALSPACEDLEVELS	= 3	/* "EqualSpacedLevels"	*/
} NhlLevelSelectionMode;

Type name:		NhlTScalingMode
typedef enum _NhlScalingMode {
	NhlSCALEFACTOR		= 0,	/* "ScaleFactor"	*/
	NhlCONFINETORANGE	= 1,	/* "ConfineToRange"	*/
	NhlTRIMZEROS		= 2,	/* "TrimZeros"		*/
	NhlMAXSIGDIGITSLEFT	= 3,	/* "MaxSigDigitsLeft"	*/
        NhlALLINTEGERS		= 4	/* "AllIntegers"	*/
} NhlScalingMode;

Type name:		NhlTLabelBarEndStyle
typedef enum _NhlLabelBarEndStyle {
	NhlINCLUDEOUTERBOXES	= 0,	/* "IncludeOuterBoxes"	 */
	NhlINCLUDEMAXMINLABELS	= 1,	/* "IncludeMaxMinLabels" */
	NhlEXCLUDEOUTERBOXES	= 2,	/* "ExcludeOuterBoxes"	 */
} NhlLabelBarEndStyle;


Local resources

|			DataComm resource set			|
| dcDelayCompute		NhlTBoolean		RCSG	|
|	DcDelayCompute			False			|

Superclass resources

All the Transform object resources can be set for DataComm objects.


The DataComm class is used as a building block for all the graphical objects that visualize data. It provides the NhlAddData, NhlRemoveData, and NhlUpdateData functions.

The dcDelayCompute resource is used to indicate when the object should update itself. By default, if a user modifies a DataItem object that has already been associated with a data resource in a DataComm subclass, then the DataComm subclass is notified immediately, and actually updates its data extents at the time the DataItem is modified. If the dcDelayCompute resource is True, then the DataComm object just notes that the DataItem has been changed; it doesn't update its data extents. The DataComm class will automatically update its data extents based on changes when the NhlDraw function is called on it, or if the user calls the NhlUpdateData function on it.

Support functions

The following support functions are defined for objects of type DataComm:
The NhlAddData function is used to associate a DataItem with a data resource.
The NhlRemoveData function is used to unassociate a DataItem with a data resource.
The NhlUpdateData function is used to tell a DataComm object to update its internal state with the changes of any DataItem objects that are associated with its data resources.
This function just determines if a given object id identifies a DataComm class object.

See also