Namespace: OpenEdge.Core
Class
Memptr
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object
Implements: Ccs.Common.Support.IMemptrHolder

Copyright (c) 2014-2017 by Progress Software Corporation. All rights reserved.
File:Memptr
Purpose:Object representation of an ABL primitive MEMPTR.
Author(s):pjudge
Created:Wed Apr 02 16:42:15 EDT 2014
Notes:* The constructor with the memptr input is a deep copy/clone
of the input memptr. The caller is responsible for cleanup
of that input memptr. If a shallow copy is desired, then the
(size, pointer-value) constructor should be used.




Method Summary
Options Name Purpose
_Debug () /** Debug/dump of the contents of this object on a per-byte basic. COPY-LOB can also be used for debug purposes (COPY-LOB objMemptr:Value TO FILE). */
Clear () /** Clears/resets the current memptr. Clears the memory and resets it to its former size. */
INTEGER GetByte (int64) /** Returns a byte at the specified position @param int64 The position at which to return the byte. @return integer The byte value at the current position */
OpenEdge.Core.Memptr GetBytes (int64) /** Returns a Memptr instance containing the specified number of bytes, starting at the current Position. @param int64 The number of bytes to return @return Memptr The complete data */
OpenEdge.Core.Memptr GetBytes (int64, int64) /** Returns a Memptr instance containing the specified number of bytes, starting at the specified postition. @param int64 The starting position @param int64 The number of bytes to return @return Memptr The complete bucket data */
RAW GetHash () /** Returns a hash of the current contents of the memptr. This can be used for comparing memptr values quickly. @return raw The hashed value of the memptr. */
RAW GetHash (HashAlgorithmEnum) /** Returns a hash of the current contents of the memptr. This can be used for comparing memptr values quickly. @param HashAlgorithmEnum The algorithm to use for the message @return raw The hashed value of the memptr. */
INT64 GetPointerValue () /** Returns the pointer value of the current memptr. @param int64 The pointer to memory represented by this memptr */
LONGCHAR GetString (int64) /** Returns a string/character representation from a given start position, for the remainder of the data. @param int64 The start potision @return longchar The character/string data requested */
LONGCHAR GetString (int64, int64) /** Returns a string/character representation a particular number of bytes, from a given start position. @param int64 The start potision @param int64 The size of the data (in bytes) to return @return longchar The character/string data requested */
LONGCHAR GetString (int64, int64, character) /** Returns a string/character representation a particular number of bytes, from a given start position. @param int64 The start potision @param int64 The size of the data (in bytes) to return @param character The target codepage for the character data @return longchar The character/string data requested */
LONGCHAR GetString (int64, int64, character, character) /** Returns a string/character representation a particular number of bytes, from a given start position. @param int64 The start potision @param int64 The size of the data (in bytes) to return @param character The source codepage for the character data @param character The target codepage for the character data @return longchar The character/string data requested */
PutBytes (int64, int64) /** Copies all of the bytes from a memptr into this memptr. The caller is responsible for cleaning up the memptr. @param int64 The pointer to memory represented by a memptr (via get-pointer-value). @param int64 The size of the memptr represented by the pointer value. */
PutBytes (memptr) /** Copies all of the bytes from a memptr (primitive) into this bucket. The caller is responsible for cleaning up the memptr. @param memptr The memptr containing the data. */
PutBytes (raw) /** Copies all of the bytes from a raw into this memptr. @param raw The raw variable containing the source data */
CHARACTER ToString ()

Constructor Summary
Options Name Purpose
Memptr ()
Memptr (int64) /** Constructor. @param int64 The size of the memptr to be created. */
Memptr (int64, int64) /** Constructor. @param int64 The pointer to memory represented by a memptr (via get-pointer-value). @param int64 The size of the memptr represented by the pointer value. */
Memptr (memptr) /** Deep copy/clone of the input memptr. Caller is responsible for cleanup. */
Memptr (raw) /** Deep copy/clone of the input memptr. */

Property Summary
Options Name Purpose
LOGICAL AutoDestroy /** Indicates whether the memptr will be destroyed/cleared when this object is destroyed. Default is TRUE. */
OpenEdge.Core.Memptr Empty /** Returns a new, empty/null Memptr */
LOGICAL ExternalAllocation /** indicates whether the memory is being managed by */
INT64 Size /** The size of the current memptr */
OpenEdge.Core.Memptr Value /** A public representation of the memptr. */


Method Detail
Top

_Debug ()

Purpose: Debug/dump of the contents of this object on a per-byte basic. COPY-LOB
can also be used for debug purposes (COPY-LOB objMemptr:Value TO FILE).
Top

Clear ()

Purpose: Clears/resets the current memptr. Clears the memory and resets it to
its former size.
Top

INTEGER GetByte (int64)

Purpose: Returns a byte at the specified position
Parameters:
piPos INT64
Returns INTEGER
integer The byte value at the current position
Top

OpenEdge.Core.Memptr GetBytes (int64)

Purpose: Returns a Memptr instance containing the specified number of bytes,
starting at the current Position.
Parameters:
piStartPos INT64
Returns OpenEdge.Core.Memptr
Memptr The complete data
Top

OpenEdge.Core.Memptr GetBytes (int64, int64)

Purpose: Returns a Memptr instance containing the specified number of bytes,
starting at the specified postition.
Parameters:
piStartPos INT64
piSliceSize INT64
Returns OpenEdge.Core.Memptr
Memptr The complete bucket data
Top

RAW GetHash ()

Purpose: Returns a hash of the current contents of the memptr. This can be used
for comparing memptr values quickly.
Returns RAW
raw The hashed value of the memptr.
Top

RAW GetHash (HashAlgorithmEnum)

Purpose: Returns a hash of the current contents of the memptr. This can be used
for comparing memptr values quickly.
Parameters:
poAlgorithm OpenEdge.Core.HashAlgorithmEnum
Returns RAW
raw The hashed value of the memptr.
Top

INT64 GetPointerValue ()

Purpose: Returns the pointer value of the current memptr.
Returns INT64
Top

LONGCHAR GetString (int64)

Purpose: Returns a string/character representation from a given start position,
for the remainder of the data.
Parameters:
piStartPos INT64
Returns LONGCHAR
longchar The character/string data requested
Top

LONGCHAR GetString (int64, int64)

Purpose: Returns a string/character representation a particular number of bytes,
from a given start position.
Parameters:
piStartPos INT64
piSliceSize INT64
Returns LONGCHAR
longchar The character/string data requested
Top

LONGCHAR GetString (int64, int64, character)

Purpose: Returns a string/character representation a particular number of bytes,
from a given start position.
Parameters:
piStartPos INT64
piSliceSize INT64
pcTargetCodepage CHARACTER
Returns LONGCHAR
longchar The character/string data requested
Top

LONGCHAR GetString (int64, int64, character, character)

Purpose: Returns a string/character representation a particular number of bytes,
from a given start position.
Parameters:
piStartPos INT64
piSliceSize INT64
pcSourceCodepage CHARACTER
pcTargetCodepage CHARACTER
Returns LONGCHAR
longchar The character/string data requested
Top

PutBytes (int64, int64)

Purpose: Copies all of the bytes from a memptr into this memptr. The
caller is responsible for cleaning up the memptr.
Parameters:
piPointerValue INT64
piSize INT64
Top

PutBytes (memptr)

Purpose: Copies all of the bytes from a memptr (primitive) into this bucket. The
caller is responsible for cleaning up the memptr.
Parameters:
pmData OpenEdge.Core.Memptr
Top

PutBytes (raw)

Purpose: Copies all of the bytes from a raw into this memptr.
Parameters:
prData RAW
Top

CHARACTER ToString ()

Returns CHARACTER


Constructor Detail
Top

Memptr ()

Top

Memptr (int64)

Purpose: Constructor.
Parameters:
piSize INT64
Top

Memptr (int64, int64)

Purpose: Constructor.
Parameters:
piPtr INT64
piSize INT64
Top

Memptr (memptr)

Purpose: Deep copy/clone of the input memptr. Caller is responsible for cleanup.
Parameters:
pmValue OpenEdge.Core.Memptr
Top

Memptr (raw)

Purpose: Deep copy/clone of the input memptr.
Parameters:
prValue RAW


Property Detail
Top

LOGICAL AutoDestroy

Purpose: Indicates whether the memptr will be destroyed/cleared when this object
is destroyed. Default is TRUE.
Returns LOGICAL
Top

OpenEdge.Core.Memptr Empty

Purpose: Returns a new, empty/null Memptr
Returns OpenEdge.Core.Memptr
Top

LOGICAL ExternalAllocation

Purpose: indicates whether the memory is being managed by
Returns LOGICAL
Top

INT64 Size

Purpose: The size of the current memptr
Returns INT64
Top

OpenEdge.Core.Memptr Value

Purpose: A public representation of the memptr.
Returns OpenEdge.Core.Memptr


Copyright © 2017 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7