Carapace

Built-in Classes

Carapace supports the following built-in classes:

basic the basic types of the language
system operating-system features
comms communications-related classes
COM COM-related classes
database classes to give you access to relational databases

To complement these classes, there are several built-in functions.

Basic Classes

The following classes provide the basic types of the language:

Lista list is an ordered sequence of objects which can be extended
Stringstrings of characters ending with a null byte
Integerinteger numbers
Realreal numbers (floating-point)
Binarysequence of any characters (including nulls)
Bufferextensible sequence of any characters (including nulls)
Symbola name eg. of a function or variable
Erroran error
Arrayan array of entries - which cannot be extended
HashTablea lookup table
Referenceholds a reference to another object

System-related Classes

The following classes encapsulate operating-system features:

Registryprovides access to the system registry which holds configuration information
Threada thread is an independent processing agent
Eventan event - used to synchronise threads or processes
Locka lock prevents concurrent access to a shared resource
LifetimeLocka lifetime lock holds the lock for the lifetime of the object
CriticalSectiona critical section, like a lock, protects against concurrent access of a resource
Streama stream gives access to files, standard input/output etc.
Shortcuta shortcut to the file -- on the user's desktop, for example

Communications-related Classes

The following classes are used for communications between components:

CommsStacka stack of communication modules
TcpTCP/IP communication module
X25X.25 communication module
Rasdialup TCP communications object
SerialSerial port communication module
TapiTelephone API communication module
TelnetTelnet protocol communication module
FtpFTP (File Transfer Protocol) communication module
MimeMIME (Multipurpose Internet Mail Extensions) helper class
SmtpSMTP (Simple Mail Transfer Protocol) communication module
Pop3POP3 (Post Office Protocol) communication module
HttpHTTP (Hypertext Transfer Protocol) communication module
Utila utility communication module
ScriptModulea wrapper to allow a class defined in Carapace script to be used as a comms module
Screena screen-mapper used to map simple character-based displays
Queuea queue of items - used for inter-thread communication
Loga log file - used to record communication traffic
UdpUDP (user datagram) class for transferring IP datagrams

COM-related Classes

The following classes are used for COM support:

Guida GUID is a globally unique identifier
Unknownwraps an IUnknown interface from which all other COM interfaces are derived
Dispatchwraps an IDispatch interface - a generic COM interface used to communicate with many COM servers
Typeliba type library defines a set of COM components
Apartmentan apartment offers COM server capability
Enumeratorenumerates over a set of objects
ComStreamused to pass COM objects between threads

Database Classes

Via COM, Carapace uses the ActiveX Data Objects (ADO) for connecting to databases. ADO provides an interface onto a wide variety of data sources including relational databases, such as Oracle or Sybase, or the Microsoft Active Directory Service.

The following objects are used for database access:

Dba Carapace helper-class to make ADO easier to use
ADODB.Connectionthe basic connection onto the database
ADODB.Commanda parameterised SQL command
ADODB.RecordSeta view onto a set of rows within the database
Decimaldatabase columns can hold a decimal value whose precision exceeds that of the Carapace Integer or Real types


Contents Index Current topic: objects Related topics: functions