Main Page
    Cookbook/Overview     ImageMeister     the jcprops file     Licensing
    Binary Installation & Configuration [ Win · Mac · Nix · OSX ]     Changes
    Public API
    Source Code Main Page
        Java [ Common · Win · Mac · Nix ]     Native Code [ Common · Win · Mac · Nix ]     Manifest
        Native Code Overviews [ Common · Win · Mac · Nix · Strings ]     Macros [ General · Native Macros ]
        Walkthroughs [ Java only · Java and native ]     Building [ Win · Mac · Nix · OSX ]     Distribution Issues

Strings

This file describes how strings are handled in the native code.

In the native code, strings are represented using two classes:

CStrW is used only on Windows.

The files which use strings usually refer to them as CStr; the token 'CStr' is defined to be CStrA or CStrW depending on the platform, and whether the symbol UNICODE is defined:

On Windows, if UNICODE is defined, CStr is defined to be CStrW. In all other cases, CStr is defined to be CStrA.

Some methods of the CStrA and CStrW classes are different depending on the native architecture. For instance, in JNI builds, a CStrA can be constructed from a JNI string. In RNI builds, this specific constructor is not available; in its place, a constructor which takes an RNI string is provided.

On all platforms, the file CString.h is the header file which is included in files which use CStr's. This file includes CStrA.h, and sets 'CStr' to the appropriate value. On Windows, CString.h also includes 'CStrW.h'.

CString.h also defines some macros used with CStr's:


DECLARESTR(a)
	Allocates space for a CStr*, and sets it to null

MAKESTR(a,b)
	Constructs a CStr from a Java String. If 'a' is null, or if an exception
	occurs, sets 'theErr' and jumps to 'bail'
	'a' is the Java string ( JSTRING )
	'b' is the CStr*

DELETESTR(a)
	If 'a' isn't null, calls 'delete' on it.
See AppUtilsMSVM.cpp for examples of these macros.



Main Page · JConfig · ImageMeister · System Properties Repository · WordMeister · Free Samples · Java Freeware · Contact Us · FAQ · Links


Copyright (c) 1997-2002 Samizdat Productions. All Rights Reserved.
WarpMovie, TileMovie, JConfig, ImageMeister and MovieShredder are Trademarks of Samizdat Productions.