head 1.1; branch 1.1.1; access ; symbols DEVEL:1.1.1.1 HEAD:1.1.1; locks ; strict; comment @# @; 1.1 date 2001.03.16.18.12.21; author jallali; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.03.16.18.12.21; author jallali; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.oti.palmos
Class MemPtr

    java.lang.Object
      |
      +--com.ibm.oti.palmos.OSBase
            |
            +--com.ibm.oti.palmos.MemPtr

Direct Known Subclasses:
  AbsRectType, AddrLookupParamsType, AlertTemplateType, AlmAlarmProcPtr, AppInfoType, BitmapFlagsType, BitmapType, BlockingHookProcPtr, CharPtr, ClipboardItem, CmpFuncPtr, ColorTableType, ControlAttrType, ControlType, CountryPreferencesType, DateTimeType, DateType, DaySelectorType, DbgControlFuncType, DbgCtlEnumCallbackFunc, DbgCtlEnumInfoType, DbgCtlHandlerInfoType, DeviceInfoType, DmComparF, DmSearchStateType, DrawStateType, DrvEntryPointProcPtr, DrvrInfoType, DrvrRcvQType, ErrExceptionType, EventType, ExgAskParamType, ExgDBDeleteProcPtr, ExgDBReadProcPtr, ExgDBWriteProcPtr, ExgDialogInfoType, ExgGoToType, ExgSocketType, FieldAttrType, FieldType, FieldUndoType, FindMatchType, FindParamsType, FlpDoubleBits, FlpLongDouble, FontCharInfoType, FontType, FormActiveStateType, FormAttrType, FormBitmapType, FormCheckResponseFuncType, FormEventHandlerType, FormFrameType, FormGadgetAttrType, FormGadgetHandlerType, FormGadgetType, FormLabelType, FormLineType, FormObjAttrType, FormObjectType, FormObjListType, FormPopupType, FormRectangleType, FormTitleType, FormType, FrameBitsType, FrmGraffitiStateType, GetCharF, GetSizeProcPtr, GetSpaceProcPtr, GoToParamsType, GraphicControlType, GraphicStateType, GrfMatchInfoType, GrfMatchType, HMSTime, HostControlParamsType, HostFILE, HwrInitProcPtr, INetCacheEntryType, INetCacheInfoType, INetConfigNameType, INetEventType, INetURLInfoType, INetURLType, Int16Ptr, Int32Ptr, Int8Ptr, IrCallBack, IrCallBackParms, IrConnect, IrDeviceAddr, IrDeviceInfo, IrDeviceList, IrIasAttribute, IrIasObject, IrIasQuery, IrIasQueryCallBack, IrPacket, IrStatsType, LauncherType, LineInfoType, ListAttrType, ListDrawDataFuncType, ListEntry, ListType, M68KExcTableType, M68KRegsType, MailAddRecordParamsType, MdmInfoType, MdmUserCanProcPtr, MemHand, MenuBarAttrType, MenuBarType, MenuCmdBarButtonType, MenuCmdBarType, MenuItemType, MenuPullDownType, MsgAddRecordParamsType, NetConfigNameType, NetHostInfoBufType, NetHostInfoType, NetIOParamType, NetIOVecType, NetMasterPBType, NetServInfoBufType, NetServInfoType, NetSocketAddrType, NetSocketLingerType, OmLocaleType, OmOverlayRscType, OmOverlaySpecType, PenBtnInfoType, PenBtnListType, PluginCallbackProcType, PluginCmdType, PluginExecCmdType, PluginInfoType, PointType, PrefActivePanelParamsType, PrgCallbackData, PrgCallbackFunc, ProcPtr, ProgressType, PtrPtr, PutStringF, RectangleType, RGBColorType, ScriptPluginSelectorProcPtr, ScrollBarAttrType, ScrollBarType, SdrvAPIType, SdrvCloseProcPtr, SdrvControlProcPtr, SdrvOpenProcPtr, SdrvReadCharProcPtr, SdrvStatusProcPtr, SdrvWriteCharProcPtr, SearchFuncPtr, SerBlockingHookHandler, SerCallbackEntryType, SerialMgrISPProcPtr, SerSettingsType, SerWakeupHandler, SilkscreenAreaType, SleepEventParamType, SliderControlType, SlkPktFooterType, SlkPktHeaderType, SlkSocketListenerProcPtr, SlkSocketListenType, SlkWriteDataType, SndBlockingFuncType, SndCallbackInfoType, SndCommandType, SndComplFuncType, SndMidiListItemType, SndMidiRecHdrType, SndMidiRecType, SndSmfCallbacksType, SndSmfChanRangeType, SndSmfOptionsType, SortRecordInfoType, SrmCallbackEntryType, SysAlarmTriggeredParamType, SysAppInfoType, SysAppLaunchCmdFailedAppNotifyType, SysAppLaunchCmdHandleSyncCallAppType, SysAppLaunchCmdInitDatabaseType, SysAppLaunchCmdOpenDBType, SysAppLaunchCmdSaveDataType, SysAppLaunchCmdSystemResetType, SysDBListItemType, SysDisplayAlarmParamType, SysEventStoreType, SysEventType, SysLibEntryProcPtr, SysLibTblEntryType, SysMailboxMsgType, SysNotifyDBInfoType, SysNotifyDisplayChangeDetailsType, SysNotifyParamType, SysNotifyProcPtr, SysPktBodyType, SysPktChecksumType, SysPktCommCmdType, SysPktCommRspType, SysPktFindCmdType, SysPktFindRspType, SysPktGremlinsCmdType, SysPktReadMemCmdType, SysPktReadMemRspType, SysPktRemoteEvtCmdType, SysPktRemoteMsgCmdType, SysPktRemoteUIUpdCmdType, SysPktRPCParamType, SysPktRPCType, SysPktWriteMemCmdType, SysPktWriteMemRspType, SystemPreferencesType, SysTermProcPtr, SysTimerProcPtr, TableAttrType, TableColumnAttrType, TableDrawItemFuncType, TableItemType, TableLoadDataFuncType, TableRowAttrType, TableSaveDataFuncType, TableType, TimeType, TsmFepStatusType, VdrvAPIType, VdrvCloseProcPtr, VdrvControlProcPtr, VdrvOpenProcPtr, VdrvReadProcPtr, VdrvStatusProcPtr, VdrvWriteProcPtr, WakeupHandlerProcPtr, WindowFlagsType, WindowType, WinLineType, WriteBlockProcPtr, WriteByteProcPtr

public class MemPtr
extends OSBase

Field Summary
`static MemPtr` | `NULL` Wrapped constant NULL pointer.
`int` | `pointer`

Fields inherited from class com.ibm.oti.palmos.OSBase
`BYTE, INT, retAddrFlag, retDataFlag, SHORT`

Constructor Summary
`MemPtr()` Default constructor, no allocation.
`MemPtr(int otherPointer)` Constructor to cast from any native pointer.
`MemPtr(MemPtr other)` Constructor to cast from another MemPtr-derived type.
`MemPtr(MemPtr other, int offset)` Constructor to cast from another MemPtr-derived type.

Method Summary
`void` | `alloc(int allocSize)` Allocate new native heap memory for this object.
`void` | `baseOn(MemPtr other)` Casting method, no allocation.
`void` | `baseOn(MemPtr other, int newOffset)` Base this MemPtr object on another with an offset.
`void` | `dispose()` Manually dispose the native memory referred to by this object.
`boolean` | `equals(Object other)` Return true if the same native address is wrapped.
`int` | `getCPointer()` Return native pointer wrapped by this object.
`int` | `hashCode()` Return hash code for this wrapped native pointer.
`boolean` | `isNull()` Return true if this object wraps NULL.
`void` | `setCPointer(int addr)` Set this object to a new native address.
`static void` | `setMemAllocListener(MemAllocListener listener)` Register a memory allocator listener for debugging purposes.

Methods inherited from class com.ibm.oti.palmos.OSBase
`getChar, getInt, getLong, getPointer, getShort, getUChar, getUInt, getULong, getUShort, memCopy, memCopy, setChar, setInt, setLong, setPointer, setShort, setUChar, setUInt, setULong, setUShort, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap, trap`

Methods inherited from class java.lang.Object
`clone, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### pointer

    public int pointer

### NULL

    public static final MemPtr NULL

  Wrapped constant NULL pointer.

Constructor Detail

### MemPtr

    public MemPtr()

  Default constructor, no allocation.

### MemPtr

    public MemPtr(MemPtr other)

  Constructor to cast from another MemPtr-derived type. This constructor does not allocate but sets pointer to the same address and/or byte array as in other.

### MemPtr

    public MemPtr(MemPtr other,
                  int offset)

  Constructor to cast from another MemPtr-derived type. This constructor does not allocate but sets pointer to the same address and/or byte array as in other and adds an offset.

### MemPtr

    public MemPtr(int otherPointer)

  Constructor to cast from any native pointer. This constructor does not allocate but sets pointer to the same address as in other.

Method Detail

### setMemAllocListener

    public static void setMemAllocListener(MemAllocListener listener)

  Register a memory allocator listener for debugging purposes. At most one listener can be registered at any time.

### baseOn

    public void baseOn(MemPtr other)

  Casting method, no allocation.

### baseOn

    public void baseOn(MemPtr other,
                       int newOffset)

  Base this MemPtr object on another with an offset. The new this.offset is the sum of other.offset + newOffset.

### alloc

    public void alloc(int allocSize)

  Allocate new native heap memory for this object. The native pointer in this object is simply overwritten by the new one, so call dispose first if required. The allocated memory is initialized to all zeroes.
  Throws:
    OutOfMemoryError - if requested memory can not be allocated.

### dispose

    public void dispose()

  Manually dispose the native memory referred to by this object. The native address in this object is set to zero. Nothing happens if dispose is called if memory already disposed.

### setCPointer

    public void setCPointer(int addr)

  Set this object to a new native address. The pointer in this object is simply overwritten by the new one, so call dispose first if required. Sets offset to 0 and bytes to null.

### getCPointer

    public int getCPointer()

  Return native pointer wrapped by this object.

### isNull

    public boolean isNull()

  Return true if this object wraps NULL.

### hashCode

    public int hashCode()

  Return hash code for this wrapped native pointer. Two different MemPtr instances for the same native address. will return the same hash code.
  Overrides:
    hashCode in class Object
  Tags copied from class: Object
  Returns:
    int the receiver's hash.
  See Also:
    `equals`

### equals

    public boolean equals(Object other)

  Return true if the same native address is wrapped. Pointer values must be equal, or this object wraps NULL and other == null.
  Overrides:
    equals in class Object
  Tags copied from class: Object
  Parameters:
    `o` - Object the object to compare with this object.
  Returns:
    boolean `true` if the object is the same as this object `false` if it is different from this object.
  See Also:
    `hashCode`

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

@ 1.1.1.1 log @import initial @ text @@