Data Access User Manual
Views Data Access Common Framework
Introducing Data Access
What is Data Access?
Libraries
Editors
Supported Databases
Distribution Structure
Data Access Basics
Overview
Views Interface
IlvDisplay
IlvApplication
Containers
Gadgets
Callbacks
Data Access Concepts
Values
Database Connection
Tables
Data Sources
Data-Source-Aware Gadgets
Formats
Masks
Integrating with Views Advanced Graphics
Tables
Introduction to Tables
One-Tier and Two-Tier Tables
The Role of a Table Object
Schemas
Schema Properties
Defining the Schema of a Table Object
Managing Rows in a Table
Basic Techniques
Techniques for Two-Tier Tables
Error Catching
Changing Error Messages
Table Hook
Copying and Serializing Table Objects
Specialized Table Subclasses
IliSQLTable
IliMemoryTable
IliStringsTable
IliMapTable
Subclassing IliTable
Guidelines
Subclassing Example
Directory Class Example
Persistence
Table Properties
Scoped Properties
Property-Aware Gadgets
Data Sources and Gadgets
Data Sources
Creating a Data Source Gadget
Connecting Data-Source-Aware Gadgets
The Scope of a Data Source
Managing Rows in a Data Source
Customizing a Data Source
Error Handling
The Repository
Data-Source-Aware Gadgets
Interface to Data-Source-Aware Gadgets
IliTableGadget
IliDbField
IliEntryField
IliTableComboBox
IliDbText
IliDbToggle
IliToggleSelector
IliDbNavigator
IliDbTimer
IliHTMLReporter
IliXML
IliDbPicture
IliDbOptionMenu
IliDbStringList
IliDbTreeGadget
IliChartGraphic
IliDbGrapher
IliDbGantt
Global Callbacks
Handling Values in Data Access
The IliValue Class
Constructing a Value Object
Null Value
Data Types
Checking the Data Type of an Object
Converting a Data Access Data Type to a C++ Type
Formatting an IliValue Object
Structured Types
Hints and Tips for Using Data Access
Working with DbFields in Data Access
The Style of a DbField
Creating a Form Using the Forms Assistant
Foreign Tables
Specifying a Foreign Table in Views Studio
Using a Foreign Table to Convert Values
Using a Foreign Table to Constrain Values
Using the Forms Assistant with Foreign Tables
Setting the Table Look
Column Geometry
Read-Only Settings
Fixed Columns
Troubleshooting
Avoiding Common Names in Foreign Tables
Matching Types with a Foreign Table
Data Access and SQL
SQL Tables
Introduction
Structural Definition
Creating the Definition Using Views Studio
Creating the Definition in C++
A Shortcut C++ Definition
The SQL Session of an SQL Table
Run-Time Options
Concurrency Control
Auto-Commit Mode
Fetch Policy
Auto-Refresh Mode
Inserting-Nulls Mode
Dynamic-SQL Mode
Bound Variables Mode
Cursor Buffering
Auto-Row Locking Mode
Parameters
Transaction Manager
Structured Types
Asynchronous Mode
SQL Data Sources
Query Mode
Parameters
Defining a Parameter
Defining a Parameter That Accepts User Input
Working with an SQL Data Source
Defining Columns
Forcing the Name of a Column
The Table Primary Key
Connecting to a Database
SQL Sessions and Cursor Objects
Creating a Session
Connecting to a Database System
Cursors
Database Drivers
The Connect Dialog Box
Registered Sessions
Views Data Access Gadgets
Views Studio Data Access Gadgets
The Palettes Panel
Data Access and SQL Gadgets
Charts, Grapher and Gantt Chart Gadgets
SQL Tables
Notebook Pages Common to Data Access Gadgets Inspectors
General Notebook Page
Callbacks Notebook Page
Dialog Boxes Common to Data Access Gadgets Inspectors
Font Chooser Dialog Box
Color Chooser Dialog Box
File Chooser Dialog Box
Data Source Gadgets Reference
IliSQLDataSource
IliSQLDataSource Inspector Panel
IliSQLDataSource Menus
General Elements
SELECT Section Notebook Pages
Dialog Boxes
IliMemoryDataSource
IliMemoryDataSource Inspector Panel
Display Gadgets Reference
IliTableGadget
Table Gadget Inspector Panel
IliDbField
DbField Inspector Panel
IliEntryField
Entry Field Inspector Panel
IliTableComboBox
Table Combo Box Inspector Panel
IliDbText
DbText Inspector Panel
IliDbToggle
DbToggle Inspector Panel
IliToggleSelector
ToggleSelector Inspector Panel
IliDbNavigator
DbNavigator Inspector Panel
IliDbTimer
DbTimer Inspector Panel
IliHTMLReporter
HTMLReporter Inspector Panel
IliXML
XML Inspector Panel
IliDbPicture
DbPicture Inspector Panel
IliDbOptionMenu
DbOptionMenu Inspector Panel
IliDbStringList
DbStringList Inspector Panel
IliDbTreeGadget
DbTreeGadget Inspector Panel
IliChartGraphic
ChartGraphic Inspector Panel
IliDbGrapher
DbGrapher Inspector Panel
IliDbGantt
DbGantt Inspector Panel
Utility Classes
The IliString Class
The IliDecimal Class
The IliDate Class
The IliFormat Class
The IliInputMask Class
Format Syntax
String Formats
Number Formats
Date Formats
Literal Characters
Mask Syntax
Placeholders
Predefined Masks
Error Messages
Data Access Getting Started
Overview
What is Data Access
Architecture
External Environment
Internal Components
Connections
SQL Session: Communication Channel Between the Application and the DBMS
Mapping the Data Source Table to Database Tables
Connecting Display Gadgets to a Data Source
Data Access Window
Main Window
Palettes Panel
General Procedures
How to Create an Application
How to Create Panels
How to Integrate Panels into an Application
How to Create a New Instance of a Panel Class
How to Generate an Application
How to Edit an Application
Introduction
What You Are Going To Do
Procedures for Creating the employdb Application
Setting Up the Database
Launching Data Access
Creating the employdb Application
Creating the Application File
Defining a Named SQL Session
Saving and Opening Windows
Saving a Window for the First Time
Saving an Edited Window
Opening a Saved Window
Database Features
What You Are Going To Do
Defining the EMP_DS SQL Data Source
Additional Information About Using the SQL Tables Palette
Connecting a Table Gadget to the EMP_DS Data Source
Additional Information about Editing Tables
Using Selection and Display Criteria
Additional Information about Selection Criteria
Saving the Window
Defining the STATUS_MDS Memory Data Source
Connecting a Table Gadget to the STATUS_MDS Data Source
Mapping Cells Between Data Sources
Defining the DEPT_DS SQL Data Source
Connecting a Table Gadget to the DEPT_DS Data Source
Mapping and Formatting the Cells
Defining a Form
How to Define a Form
Additional Information about Forms
Using Parameters to Link Data Sources
Designing Windows
Aligning Objects
Using Resources
Checking the Focus Chain
Setting the Size of the Window
Setting the Background of the Window
Setting Attachments
Testing Attachments
Adding the Employee Window to the Application
Additional Features
Creating the Employee Manager Window
What You Are Going To Do
Defining the EMPMGR_DS SQL Data Source
Connecting a Table Gadget to the EMPMGR_DS Data Source
Joining Two Tables
Additional Information about Table Joins
Using Query Mode
Additional Information about Query Mode
Finishing the Employee Manager Window
Saving the Employee Manager Window
Adding the Employee Manager Window to the Application
Creating the Department Maximum Salary Window
What You Are Going To Do
Defining the DEPTMAXSAL_DS SQL Data Source
Specifying Selection Criteria Operations
Connecting a Table Gadget to the DEPTMAXSAL_DS Data Source
Saving the Department Maximum Salary Window
Using Predefined Callbacks
Additional Information About Using Script Callbacks
Finishing the Department Maximum Salary Window
Saving the Department Maximum Salary Window
Adding the Department Maximum Salary Window to the Application
Creating the Control Window
What You Are Going To Do
Adding a Menu Bar to the Window
Creating the File Pop-up Menu
Attaching the File Pop-up Menu to the File Menu Item
Creating and Attaching the Panels Pop-up Menu
Finishing the Control Window
Saving the Control Window
Adding the Control Window to the Application
Using the Browser
Testing the Application
Generating the Application
Summary
Nested Tables
What You Are Going To Do
Setting Up the Database
Defining the PRODUCT_DS SQL Data Source
Defining the PARTS_DS SQL Data Source
Creating the Product Window
Saving the Product Window
Setting Up Data Access
Data Access Installation and Configuration
Installation Directories
Data Access and the Packages
System Name
System Environments
Setting Up Views Views, Views DB Link, and Data Access on UNIX
Setting Up Views and Data Access on Windows XP and Vista
Setting Up the Views DB Link Initialization File on Windows
Setting Up Database-Specific Variables
Format Syntax
String Formats
Number Formats
Date Formats
Literal Characters
SQL Schema Editor
Using the SQL Schema Editor
Creating the Tutorial Database Schema
Other Features
Charts
Using Charts with Views Studio
Introducing Charts in Views Studio
Launching Views Studio with the Charts Extension
A Quick Look at the Interface
Creating a Chart Object
Using the Chart Inspector
Chart Inspector Icons
General Page
Data Sets Page
Displayers Page
Projection Page
Scales Page
Layout Page
Miscellaneous Page
Callbacks Page
Using the Chart Legend Inspector
Customizing Charts
Example 1: Charting Temperatures and Pressures of the Week
Defining Several Independent Ordinate Scales
Defining a Grid Associated with a Scale
Defining a Related Ordinate Scale
Creating a Stacked or a Side-by-Side Representation
Example 2: Charting Analytic Functions
Using a Data Set Defined by a Script Function
Using Logarithmic Scales
Connecting a Legend to a Chart
Using Polar Charts
Example 1: Representing Values Expressed in Radians
Case 1: Applying a Transformation
Case 2: Setting a Starting Angle and a Range
Example 2: Representing Time Values
Creating the Polar Chart
Defining the Data Set
Defining the Displayer
Customizing the Projection
Customizing the Abscissa Scale
Customizing the Ordinate Scale
Using the Charts Library
Introducing the Charts Library
Main Features of the Charts Library
Global Chart Characteristics
Data Features
Graphical Representations of Data
Scale Features
Decorations
Interactors
Feature Illustrations
Chart Basics
What is a Chart?
General Architecture of the Charts Library
Data Classes
Chart Classes
Basic Steps for Creating a Chart
Creating a Simple Cartesian Chart
Creating a Simple Polar Chart
Additional Ways to Customize a Chart
How Charts Work in Views
Components of a Chart Object
Component Classes of the Charts Library
Using the Component Classes in an IlvChartGraphic Object
How Displayer Objects Draw the Graphical Display
Data Handling
Handling Data Storage
Types of Data Sets
Adding Data Sets to Be Displayed by a Chart
Sharing Data Among Charts
Modifying Data and Updating Charts
Types of Modifications
Updating Charts Automatically
Using Listeners to Catch Data Changes
Chart Layout
Computing the Chart Layout
Setting General Properties of a Chart Layout Object
Getting and Setting the Chart Layout Object of a Chart
Data Display
Drawing the Graphical Representations of Data
Using Single Displayers
Scatter Displayer
Polyline Displayer
Polygon Displayer
Step Displayer
Stair Displayer
Bar Displayer
3D Bar Displayer
High-Low Displayer
High-Low Bar Displayer
Pie Displayer
Using Composite Displayers
Marked Polyline Displayer
High-Low Open-Close Displayer
Stacked Displayers
Side-by-Side Displayers
Adding a Displayer to a Chart
Examples
Customizing Data Display
Adding Graphic Information to a Data Point
Defining How the Palettes are Applied for the Data Display
Projecting Out-of-Bounds Data Points
Scales Display
Drawing the Scales of a Chart
Setting General Properties
Using Single Scale Displayers
Setting General Properties
Predefined Single Scale Displayers
Using Scale Steps Updaters to Compute Scales Graduations
Adding a Scale Displayer in a Chart
Advanced Features for Customizing Scales
Changing the Orientation of the Scales
Defining the Minimum and Maximum Data Values Represented by a Scale
Applying a Transformation to the Data Values Represented by a Scale
Decorations Display
Displaying a Legend
Setting General Properties
Adding a Legend to a Chart
Displaying a Grid
Setting General Properties
Adding a Grid Displayer to a Scale
Displaying a Cursor
Setting General Properties
Adding a Cursor to a Scale
Interacting with Charts
Using the Chart Interactors
Zoom Interactor
Scroll Interactor
Pan Interactor
Crosshair Interactor
Drag-Point Interactor
Highlight-Data-Point Interactor
Information-View Interactor
Select-Data-Points Interactor
Setting an Interactor on a Chart Object
Example
Using Charts to Display Real-Time Data
Automatic Scroll Modes
Using Automatic Scroll Modes to Display Real-Time Data
Scroll Example
Improving Performance When Adding Data Points to a Chart
Releasing the Automatic Update
The IlvXMLChartData Class
Introducing the IlvXMLChartData Class
Tags Definition
data
series
valuesList
valueOperator
property
Customizing Value and Date List Processing
Graph Layout
Introducing the Graph Layout Package
What is the Graph Layout Package of Views?
Features of Views Graph Layout
Views Graph Layout in User Interface Applications
Basic Concepts
Graph Layout: A Brief Introduction
What is a Good Layout?
Methods for Using Layout Algorithms
Graph Layout in Views
The Base Class: IlvGraphLayout
Basic Operations with IlvGraphLayout
Instantiating a Subclass of IlvGraphLayout
Attaching a Grapher
Performing a Layout
Detaching a Grapher
Layout Parameters in IlvGraphLayout
Allowed Time
Animation
Layout Region
Memory Savings
Preserve Fixed Links
Preserve Fixed Nodes
Random Generator Seed Value
Use Default Parameters
Getting Started with Graph Layout
Basic Steps for Using Layout Algorithms: A Summary
Sample Application
Launching Views Studio with the Graph Layout Extension
A Quick Look at the Interface
Layout Algorithms
Determining the Appropriate Layout Algorithm
Generic Parameters Support
Layout Characteristics
Tree Layout
Samples
What Types of Graphs?
Application Domains
Features
Limitations
Brief Description of the Algorithm
Code Sample
Parameters
Generic Parameters
Specific Parameters (All Tree Layout Modes)
Free Layout Mode
Level Layout Mode
Radial Layout Mode
Tip-Over Layout Modes
For Experts: Further Tips and Tricks
Hierarchical Layout
Samples
What Types of Graphs?
Application Domains
Features
Limitations
Brief Description of the Algorithm
Code Sample
Parameters
Generic Parameters
Specific Parameters
Sequences of Graph Layout
Orthogonal Link Layout
Samples
What Types of Graphs?
Application Domains
Features
Limitations
Brief Description of the Algorithm
Code Sample
Parameters
Generic Parameters
Specific Parameters
Random Layout
Sample
What Types of Graphs?
Features
Limitations
Brief Description of the Algorithm
Code Sample
Parameters
Generic Parameters
Specific Parameters
Bus Layout
Sample
What Types of Graphs?
Application Domains
Features
Brief Description of the Algorithm
Code Sample
Parameters
Generic Parameters
Specific Parameters
Using Advanced Features
Using a Layout Report
Layout Report Classes
Creating a Layout Report
Reading a Layout Report
Information Stored in a Layout Report
Using Layout Event Listeners
Using the Graph Model
The Graph Model Concept
The IlvGraphModel Class
Using the IlvGrapherAdapter
Laying Out a Non-Views Grapher
Using the Filtering Features to Lay Out a Part of an IlvGrapher
Filtering by Layers
Filtering by Graphic Objects
Laying Out Graphs with Nonzoomable Graphic Objects
A Special Case: Nonzoomable Graphic Objects
Reference Transformers
How a Reference Transformer is Used
Reference Views
Specifying a Reference Transformer
Defining a New Type of Layout
Questions and Answers about Using the Layout Algorithms
Maps
Introducing Views Maps
What Is Views Maps?
The Map Builder
The Class Library
Installation of Views Maps
Getting Started with Views Maps
Data used in Examples
Creating a Map
Running Views Map Builder
Loading the File Containing the Coastal Borders Information
Using the Views Map Builder Toolbar
Loading the Roads into the Map
Loading the Towns
Loading the Large Towns Into the Map
Editing the Layers
Saving the File
Creating a Map with Load-on-Demand
Loading the Base Structure Map and CADRG Files
Creating a Map Using Oracle Spatial
Creating the Layer in the Database
Displaying an Oracle Spatial Layer with the Map Builder
Displaying an Oracle Spatial Layer in Load-On-Demand
Testing the Persistence of the Information
Views Maps Reader Framework
The Classes for Creating Maps: An Overview
Map Features
Map Feature Geometry
Map Feature Attributes
Attaching Attributes to Graphic Objects
Renderers
Overview of Renderers
Creating a Colored Line Renderer
Making a Renderer Persistent
Extending an Existing Renderer
Feature Iterators
Overview of IlvMapFeatureIterator
Writing a New Reader
Selecting a Target Projection
Loading Maps into Views
Loading a Map of the Views Format
The Map Loader
The Scale Filters
Using Load-On-Demand
How Load-on-Demand Works
Structure and Size of the Tiling Grid
Structure of the Tiling Grid
Size of the Tiling Grid
Displaying the State of Tiles
Controlling Load-on-Demand
Using Visibility Filters to Control Load-on-Demand
Loading Tiles via the API
Managing Errors and Load-on-Demand Events
Caching Tiles
Saving a Tiled Layer
Writing a New Cache Algorithm
Implementing Load-on-Demand for a New Data Source
Predefined Readers
The Shapefile Reader
Introducing the Shapefile Format
Classes for Reading the Shapefile Format
Shapefile Load-On-Demand
The DTED File Reader
Introducing the DTED Format
Classes for Reading the DTED Format
Graphical Rendering of a Digital Terrain Model
The CADRG File Reader
Classes for Reading the CADRG Format
The Image File Reader
The IlvImageReader Class
The IlvImageTileLoader Class
Examples
The IlvImageLayer Class
The GeoTIFF Reader
The GeoTIFF Format
The IlvGeoTIFFReader Class
The IlvGeoTIFFTileLoader Class
The IlvGeoTIFFLayer Class
The IlvGeoTIFFTiler Class
The Oracle Spatial Features
Relational Model Classes
Object Model Classes
The S57 Map Reader
Classes for reading S57 format
Configuring styles, colors and icons
Map Projections
Introducing Map Projections
Cylindrical Projections
Conic Projections
Azimuthal Projections
Equal Area or Conformal Projections
Projecting Data: An Example
Complete Code Example
Running the Example Application
Including the Projection Declaration
The Main Function
Initializing a Projection
Creating the Projected Data
Projecting the Data
Printing the Result of the Projection
Calculating the Inverse Projection
Printing Geographic Coordinates
The Complete Example
Projection Methods and Parameters
Forward and Inverse Functions
Projection Parameters
Utilities
Ellipsoids
Overview of Ellipsoids
Associating an Ellipsoid with a Projection
Defining New Ellipsoids
Predefined Ellipsoids
Unit Converters
Using Unit Converters Directly
Using Converters With Projections
Defining Unit Converters
Using Predefined Unit Converters
Conversion Between Coordinates in Different Geodetic Datums
Horizontal Datum Shift
Datum and Projections
Adding Graphic Objects on Top of an Imported Map
Complete Code Example
Running the Example Application
Defining the Sample Class, the Main Function, and the Constructor
Getting Map Information
Adding Cities
Showing the Mouse Position
Creating a New Projection
Step 1: Defining a New Projection
The Class Declaration
Defining the Projection
Writing the Forward Projection
Writing the Inverse Projection
Step 2: Defining a New Projection
Defining a New Parameter
Defining a New Error Code
Declaring the New Class
Defining The Projection
Initializing the Error Code
Using the New Parameter and the New Error Code
Writing the Input/Output Functions for the New Parameter
Step 3: Defining a New Projection
Adding Accessor Support
Map Data
Suggested Free Sources
Data Access User Manual
Map Data
NEWFEATURES