XPRMMemBlock
- java.lang.Object
-
- com.dashoptimization.XPRMMemBlock
-
- All Implemented Interfaces:
- XPRMIdentifier, XPRMTyped
public class XPRMMemBlock extends java.lang.Object
A named memory block. Named memory blocks can be allocated from a Mosel program using the 'mem' IO driver with a name (e.g. 'mem:myblk'). After execution of the model they can be found using their name then be accessed from Java through aByteBuffer
.
-
-
Field Summary
-
Fields inherited from interface com.dashoptimization.XPRMTyped
GRP_DYN, GRP_GEN, MSK_FIN, MSK_GRP, MSK_STR, MSK_TYP, STR_ARRAY, STR_CONST, STR_LIST, STR_MEM, STR_NTYP, STR_PROB, STR_PROC, STR_REC, STR_REF, STR_SET, STR_UTYP, TYP_BOOL, TYP_EXTN, TYP_INT, TYP_LINCTR, TYP_MPVAR, TYP_NOT, TYP_REAL, TYP_STRING
-
-
Method Summary
Modifier and Type Method and Description java.lang.String
getName()
Get the identifier name.int
getStructCode()
Structure code.java.lang.String
getStructName()
String representation of structure.int
getTypeCode()
Type code.java.lang.String
getTypeName()
String representation of type.java.nio.ByteBuffer
getValue()
Get the ByteBuffer associated to the memory block.java.lang.String
toString()
Return a string summarizing the state of this buffer.
-
-
-
Method Detail
-
getValue
public java.nio.ByteBuffer getValue()
Get the ByteBuffer associated to the memory block. A named memory block in Mosel is mapped to aByteBuffer
in Java.- Returns:
- The ByteBuffer associated to the named memory block
-
getStructCode
public final int getStructCode()
Description copied from interface:XPRMTyped
Structure code. The code is one of theSTR_*
values.- Returns:
- Encoded structure
-
getStructName
public final java.lang.String getStructName()
Description copied from interface:XPRMTyped
String representation of structure.- Returns:
- Structure name
-
toString
public java.lang.String toString()
Return a string summarizing the state of this buffer.- Overrides:
-
toString
in classjava.lang.Object
- Returns:
- A summary string
-
getTypeCode
public final int getTypeCode()
Description copied from interface:XPRMTyped
Type code. The code is one of theTYP_*
values.- Specified by:
-
getTypeCode
in interfaceXPRMTyped
- Returns:
- Encoded type
-
getTypeName
public java.lang.String getTypeName()
Description copied from interface:XPRMTyped
String representation of type.- Specified by:
-
getTypeName
in interfaceXPRMTyped
- Returns:
- Type name
-
getName
public java.lang.String getName()
Description copied from interface:XPRMIdentifier
Get the identifier name.- Specified by:
-
getName
in interfaceXPRMIdentifier
- Returns:
- The identifier name
-
-