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

Inherits: Progress.Lang.Object

Copyright (c) 2014, 2015 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 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. */
# 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. */

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

PROTECTED _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

PROTECTED Clear ()

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

PROTECTED 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

PROTECTED 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

PROTECTED 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

PROTECTED 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

PROTECTED 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

PROTECTED INT64 GetPointerValue ()

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

PROTECTED 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

PROTECTED 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

PROTECTED 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
pcCodepage CHARACTER
Returns LONGCHAR
longchar The character/string data requested
Top

PROTECTED 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

PROTECTED 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

PROTECTED CHARACTER ToString ()

Returns CHARACTER


Constructor Detail
Top

Memptr ()

Top

PROTECTED Memptr (int64)

Purpose: Constructor.
Parameters:
piSize INT64
Top

PROTECTED Memptr (int64, int64)

Purpose: Constructor.
Parameters:
piPtr INT64
piSize INT64
Top

PROTECTED Memptr (memptr)

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


Property Detail
Top

PROTECTED LOGICAL AutoDestroy

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

PROTECTED OpenEdge.Core.Memptr Empty

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

PROTECTED LOGICAL ExternalAllocation

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

PROTECTED INT64 Size

Purpose: The size of the current memptr
Returns INT64
Top

PROTECTED OpenEdge.Core.Memptr Value

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


10.27.2015 12:36:27