Finale PDK Framework 0.79
Lua Power for Finale Music Software
Loading...
Searching...
No Matches
FCRawData Class Reference

Generic low-level Enigma data accessor for one data record. More...

#include <ff_rawdata.h>

+ Inheritance diagram for FCRawData:

Public Member Functions

const char * ClassName () const override
 Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child class.
 
const PDKFRAMEWORK_CLASSID GetClassID () const override
 Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has problems to resolve the true classes of inherited objects.
 
 FCRawData ()
 The constructor.
 
bool AssignTarget (__FCBaseData *pSource)
 Copies EXTAG, EDataID, and Enigma version from a __FCBaseData object.
 
EXTAG GetTag () const
 Returns the EXTAG value.
 
void SetTag (EXTAG tag)
 Sets the EXTAG value.
 
EVERSION GetVersion () const
 Returns the Enigma version used in FX_*EData calls.
 
void SetVersion (EVERSION version)
 Sets the Enigma version used in FX_*EData calls.
 
void SetTagAsOther (const std::string &tagChars, int incisPerStruct=1)
 Sets current tag using MakeOtherTag.
 
void SetTagAsDetail (const std::string &tagChars, int incisPerStruct=1)
 Sets current tag using MakeDetailTag.
 
void SetTagAsEntryDetail (const std::string &tagChars, int incisPerStruct=1)
 Sets current tag using MakeEntryDetailTag.
 
void SetDataIDAsOther (CMPER cmper, twobyte inci=0)
 Sets the EDataID as an "other" ID.
 
void SetDataIDAsDetail (CMPER cmper1, CMPER cmper2, twobyte inci=0)
 Sets the EDataID as a "detail" ID.
 
void SetDataIDAsEntryDetail (ENTNUM entryNumber, twobyte inci=0)
 Sets the EDataID as an "entry detail" ID.
 
void SetTargetAsOther (const std::string &tagChars, CMPER cmper, twobyte inci=0, int incisPerStruct=1)
 Convenience helper: sets tag and EDataID for an "other" target in one call.
 
void SetTargetAsDetail (const std::string &tagChars, CMPER cmper1, CMPER cmper2, twobyte inci=0, int incisPerStruct=1)
 Convenience helper: sets tag and EDataID for a "detail" target in one call.
 
void SetTargetAsEntryDetail (const std::string &tagChars, ENTNUM entryNumber, twobyte inci=0, int incisPerStruct=1)
 Convenience helper: sets tag and EDataID for an "entry detail" target in one call.
 
CMPER GetOtherCmper () const
 Returns the "other" cmper value from EDataID.
 
twobyte GetOtherInci () const
 Returns the "other" inci value from EDataID.
 
CMPER GetDetailCmper1 () const
 Returns detail cmper1 from EDataID.
 
CMPER GetDetailCmper2 () const
 Returns detail cmper2 from EDataID.
 
twobyte GetDetailInci () const
 Returns detail inci from EDataID.
 
ENTNUM GetEntryDetailEntryNumber () const
 Returns entry number from EDataID.
 
twobyte GetEntryDetailInci () const
 Returns entry detail inci from EDataID.
 
ETAG GetTagDataType () const
 Returns the top-word data type of the current EXTAG (for example edOther).
 
std::string GetTagChars () const
 Returns the two-character low-word tag code of the current EXTAG.
 
int GetIncisPerStruct () const
 Returns the configured incidences-per-struct implied by current tag data type.
 
void ClearData ()
 Clears the stored raw payload.
 
int GetByteCount () const
 Returns the number of stored bytes.
 
std::string GetData () const
 Returns the stored payload as a binary string.
 
void SetData (const std::string &data)
 Sets the stored payload from a binary string.
 
std::vector< int > GetByteTable () const
 Returns payload bytes as integer values (0..255).
 
void SetByteTable (const std::vector< int > &table)
 Sets payload bytes from integer values (0..255).
 
std::vector< int > GetTwoByteTable () const
 Returns payload as little-endian 16-bit values (0..65535).
 
void SetTwoByteTable (const std::vector< int > &table)
 Sets payload from little-endian 16-bit values (0..65535).
 
std::vector< int > GetFourByteTable () const
 Returns payload as little-endian signed 32-bit values.
 
void SetFourByteTable (const std::vector< int > &table)
 Sets payload from little-endian signed 32-bit values.
 
int GetFourByte (int byteOffset) const
 Reads a signed 32-bit value at the given byte offset.
 
bool SetFourByte (int byteOffset, int value)
 Writes a signed 32-bit value at the given byte offset.
 
bool Load ()
 Loads the record by first querying its raw size.
 
bool LoadWithSize (int byteCount)
 Loads the record using a caller-provided byte size.
 
bool LoadWithExpectedSize (int expectedByteCount)
 Loads the record and verifies an exact byte size match.
 
bool Exists () const
 Returns true if the current target exists.
 
bool LoadNextInci ()
 Increments current inci and attempts to load the next record.
 
bool Save () const
 Saves current payload to current EXTAG/EDataID location.
 
bool Create ()
 Creates a new record with current payload.
 
bool Delete () const
 Deletes the current EXTAG/EDataID record.
 
- Public Member Functions inherited from __FCBase
virtual ~__FCBase ()
 Virtual destructor, so all inherited classes get the virtual destructor.
 
void DebugMsgInt (const char *pszPrefixText, int i)
 Creates a simple Message Box for debug purposes. The text appears with the extra digit (in decimal presentation) appearing afterwards.
 
void DebugMsgHex (const char *pszPrefixText, int i)
 Creates a simple Message Box for debug purposes. The text appears with the extra digit (as a hexadecimal number) appearing afterwards.
 
void DebugMsgString (const char *pszPrefixText, const char *thestring)
 Creates a simple Message Box for debug purposes. The text appears with the extra string appearing afterwards.
 
void DebugMsg (const char *pszMsg)
 Creates a simple Message Box for debug purposes with just one text string.
 
void DebugOutMenuInfo (FCUI *pUI, int menuixd_horiz, int menuixd_vert) const
 Outputs the menu command info for debugging purposes.
 
int DebugOutFormat (const char *fmt,...)
 Outputs debug text using C style "printf" syntax.
 
virtual void DebugDump ()
 Outputs the class data/information for debugging purposes.
 
virtual void DebugDataDump ()
 Outputs a memory dump of the data block in the object for debugging purposes.
 
virtual void DebugDataByteArrayDump ()
 Outputs a memory dump of the data block in the object for debugging purposes, as a C++ byte array.
 
void Set16BitFlag (FLAG_16 *flag, FLAG_16 flagbits, bool state)
 Sets a 16 bit flag.
 
void Set32BitFlag (FLAG_32 *flag, FLAG_32 flagbits, bool state)
 Sets/resets a 32 bit flag, by using a bit mask.
 
bool GetBitFlag (FLAG_32 flag, FLAG_32 flagbits) const
 Gets a state from flag bits. Returns true if any bit in the mask is set.
 
int GetBitCount (FLAG_32 flag)
 Returns the total number of set bits in a 32-bit unsigned int.
 
void SetSpecific32Bit (FLAG_32 *flag, int bitnumber, bool state)
 Sets/resets a single bit in a 32 bit flag, by specifying one specific bit.
 
void SetUserData (void *pData)
 Sets the user data attached to the instance of an object.
 
void SetUserData2 (void *pData)
 Sets the additional user data attached to the instance of an object.
 
void * GetUserData () const
 Gets the user data attached to the instance of an object.
 
void * GetUserData2 () const
 Gets the additional user data attached to the instance of an object.
 
virtual bool IsIdentical (const __FCBase *pCompareObject) const
 Returns true if the data in the passed object is considered to be identical to the current object, otherwise false.
 
void StoreXML_String (tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
 Helper function to store FCString objects in the XML file.
 
void StoreXML_Integer (tinyxml2::XMLElement *pParentNode, const char *pszElementName, int value)
 Helper function to store integer objects in the XML file.
 
void StoreXML_Bool (tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool value)
 Helper function to store boolean objects in the XML file.
 
void StoreXML_StringAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, FCString *pStringValue)
 Helper function to store FCString objects in the XML file, as an attribute to a node.
 
void StoreXML_IntegerAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, int value)
 Helper function to store integer objects in the XML file, as an attribute to a node.
 
void StoreXML_BoolAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, bool value)
 Helper function to store boolean objects in the XML file, as an attribute to a node.
 
void StoreXML_FloatAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, float value)
 Helper function to store floating point objects in the XML file, as an attribute to a node.
 
virtual void StoreToXML (tinyxml2::XMLElement *pParentNode)
 Virtual method that is used to store an object's data.
 
bool ReadXML_String (tinyxml2::XMLElement *pParentNode, const char *pszElementName, FCString *pStringValue)
 Helper method to read FCString objects from the XML file.
 
bool ReadXML_Integer (tinyxml2::XMLElement *pParentNode, const char *pszElementName, int *pValue)
 Helper method to read integer objects from the XML file.
 
bool ReadXML_Bool (tinyxml2::XMLElement *pParentNode, const char *pszElementName, bool *pValue)
 Helper method to read boolean objects from the XML file.
 
bool ReadXML_StringAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, FCString *pStringValue)
 Helper method to read FCString objects from the XML file, as an attribute to a node.
 
bool ReadXML_IntegerAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, int *pValue)
 Helper method to read integer objects from the XML file, as an attribute to a node.
 
bool ReadXML_BoolAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, bool *pValue)
 Helper method to read boolean objects from the XML file, as an attribute to a node.
 
bool ReadXML_FloatAttribute (tinyxml2::XMLElement *pNode, const char *pszAttributeName, float *pValue)
 Helper method to read floating point objects from the XML file, as an attribute to a node.
 
virtual bool ReadFromXML (tinyxml2::XMLElement *pParentNode)
 Virtual method that is used to read object data.
 

Static Public Member Functions

static EXTAG MakeOtherTag (const std::string &tagChars, int incisPerStruct=1)
 Makes an EXTAG for other data from two tag characters and optional incis-per-struct.
 
static EXTAG MakeDetailTag (const std::string &tagChars, int incisPerStruct=1)
 Makes an EXTAG for detail data from two tag characters and optional incis-per-struct.
 
static EXTAG MakeEntryDetailTag (const std::string &tagChars, int incisPerStruct=1)
 Makes an EXTAG for entry detail data from two tag characters and optional incis-per-struct.
 
- Static Public Member Functions inherited from __FCBase
static void DebugOutPtr (const char *pszPrefixText, void *ptr)
 Static method that outputs a line for debugging purposes. The prefix text appears with the extra ptr (in hexadeximal representation) appearing afterwards.
 
static void DebugOutInt (const char *pszPrefixText, int i)
 Static method that outputs a line for debugging purposes. The text appears with the extra digit (in decimal presentation) appearing afterwards.
 
static void DebugOutFloat (const char *pszPrefixText, double f)
 Static method that outputs a line for debugging purposes. The text appears with the extra float value appearing afterwards.
 
static void DebugOutTag (const char *pszPrefixText, EXTAG extag)
 Static method that outputs a line for debugging purposes. The text appears with the EXTAG (in text) appearing afterwards.
 
static void DebugOutHex (const char *pszPrefixText, int i)
 Static method that outputs a line for debugging purposes. The text appears with the extra digit (in hexadecimal presentation) appearing afterwards.
 
static void DebugOutBin (const char *pszPrefixText, int i)
 Static method that outputs a line for debugging purposes. The text appears with the extra digit (in binary presentation) appearing afterwards.
 
static void DebugOutString (const char *pszPrefixText, const char *thestring)
 Static method that outputs a line for debugging purposes (C string version). The text appears with the extra string appearing afterwards.
 
static void DebugOutString (const char *pszPrefixText, FCString *pString)
 Static method that outputs a line for debugging purposes (FCString version). The text appears with the extra string appearing afterwards.
 
static void DebugOutBool (const char *pszPrefixText, bool state)
 Static method that outputs a line for debugging purposes. The boolean state appears afterwards as either "TRUE" or "FALSE".
 
static void DebugOutBlock (const void *pBuffer, int startoffset, int size)
 Static method that outputs a memory block for debugging purposes. Eight bytes per line will appear (as hex digits) until the whole memory block is dumped.
 
static void DebugOutByteArrayBlock (const void *pBuffer, int startoffset, int size)
 Static method that outputs a memory block for debugging purposes. Eight bytes per line will appear (as hex digits) as a C++ onebyte array, until the whole memory block is dumped.
 
static void DebugOut (const char *pszLine)
 Static method to output a line of text for debugging purposes.
 

Additional Inherited Members

- Public Types inherited from __FCBase
enum  PDKFRAMEWORK_CLASSID {
  FCID_UNKNOWN = 0 , FCID_ACCIDENTALMOD , FCID_ACTIVELYRIC , FCID_ALLOTMENT ,
  FCID_ARTICULATION , FCID_ARTICULATIONDEF , FCID_BACKWARDREPEAT , FCID_BASELINE ,
  FCID_BEAMMOD , FCID_BEATCHARTELEMENT , FCID_BOOKMARK , FCID_BROKENBEAMMOD ,
  FCID_CATEGORYDEF , FCID_CELLCLEFCHANGE , FCID_CELLFRAMEHOLD , FCID_CELLGRAPHIC ,
  FCID_CELLTEXT , FCID_CENTERSMARTSHAPE , FCID_CHORD , FCID_CHORDPREFS ,
  FCID_CHORDSUFFIXELEMENT , FCID_CHORUSSYLLABLE , FCID_CLEFDEF , FCID_COMPOSITETIMESIGBOTTOMELEMENT ,
  FCID_COMPOSITETIMESIGTOPELEMENT , FCID_CROSSSTAFFMOD , FCID_CUSTOMSMARTLINEDEF , FCID_CUSTOMSTEMMOD ,
  FCID_DISTANCEPREFS , FCID_DOTMOD , FCID_ENCLOSURE , FCID_ENDINGREPEAT ,
  FCID_ENIGMATEXTSTYLE , FCID_ENTRYALTERMOD , FCID_EXECUTABLESHAPEDEF , FCID_EXPRESSION ,
  FCID_FONTINFO , FCID_FONTPREFS , FCID_FREEZESYSTEM , FCID_FRETBOARDSTYLEDEF ,
  FCID_FRETBOARDSTYLEDEFS , FCID_FRETBOARDGROUPDEF , FCID_FRETBOARDGROUPDEFS , FCID_FRETINSTRUMENTDEF ,
  FCID_GENERALPREFS , FCID_GRIDSGUIDESPREFS , FCID_GROUP , FCID_GROUPNAMEPOSITIONPREFS ,
  FCID_HUMANPLAYBACKPREFS , FCID_INDEPENDENTCELLDETAIL , FCID_INSTRUMENTDEF , FCID_INSTRUMENTPLAYBACKDATA ,
  FCID_KEYMODEDEF , FCID_KEYSIGNATURE , FCID_LAYERPREFS , FCID_LYRICSBASELINE ,
  FCID_LYRICSPREFS , FCID_MEASURE , FCID_MEASURENUMBERREGION , FCID_METATOOLASSIGNMENT ,
  FCID_MIDIEXPRESSION , FCID_MISCDOCPREFS , FCID_MULTIMEASUREREST , FCID_MULTIMEASURERESTPREFS ,
  FCID_MULTISTAFFINSTRUMENT , FCID_MULTISTAFFINSTRUMENTS , FCID_MUSICCHARACTERPREFS , FCID_MUSICSPACINGPREFS ,
  FCID_NUMBER , FCID_NOTEHEADMOD , FCID_OTHERINCI , FCID_PERCUSSIONLAYOUTNOTE ,
  FCID_PERCUSSIONSTAFF , FCID_PERFORMANCEMOD , FCID_PAGE , FCID_PAGEFORMATPREFS ,
  FCID_PAGEGRAPHIC , FCID_PAGETEXT , FCID_PART , FCID_PARTEXTRACTPREFS ,
  FCID_PARTSCOPEPREFS , FCID_PARTSTAFFVOICING , FCID_PERCUSSIONNOTEMOD , FCID_PIANOBRACEPREFS ,
  FCID_PLAYBACKPREFS , FCID_RAWTEXT , FCID_RAWDATA , FCID_REPEATPREFS ,
  FCID_SECONDARYBEAMBREAKMOD , FCID_BEAMEXTENSIONMOD , FCID_SECTIONSYLLABLE , FCID_SEPARATEMEASURENUMBER ,
  FCID_SEPARATEPLACEMENT , FCID_SHAPEDEF , FCID_SHAPEEXPRESSIONDEF , FCID_SLURCONTOURPREFS ,
  FCID_SIZEPREFS , FCID_SMARTSHAPE , FCID_SMARTSHAPEENTRYMARK , FCID_SMARTSHAPEMEASUREMARK ,
  FCID_SMARTSHAPEPREFS , FCID_STAFF , FCID_STAFFLIST , FCID_STAFFNAMEPOSITION ,
  FCID_STAFFNAMEPOSITIONPREFS , FCID_STAFFSTYLEASSIGN , FCID_STAFFSTYLEDEF , FCID_STAFFSYSTEM ,
  FCID_STEMCONNECTIONTABLE , FCID_STEMMOD , FCID_STRING , FCID_SYLLABLEENTRYMOD ,
  FCID_SYSTEMSTAFF , FCID_TABLATURENOTEMOD , FCID_TEMPOELEMENT , FCID_TEXTBLOCK ,
  FCID_TEXTEXPRESSIONDEF , FCID_TEXTREPEAT , FCID_TEXTREPEATDEF , FCID_TIEMOD ,
  FCID_TIEPREFS , FCID_TIECONTOURPREFS , FCID_TIEPLACEMENTPREFS , FCID_TIMESIGNATURE ,
  FCID_TUPLET , FCID_TUPLETPREFS , FCID_VERSESYLLABLE
}
 Constants for the GetClassID method. More...
 
enum  MEASUREMENTUNITS {
  MEASUREMENTUNIT_DEFAULT = UNIT_DEFAULT , MEASUREMENTUNIT_EVPUS = UNIT_EVPUS , MEASUREMENTUNIT_INCHES = UNIT_INCHES , MEASUREMENTUNIT_CENTIMETERS = UNIT_CENTS ,
  MEASUREMENTUNIT_POINTS = UNIT_POINTS , MEASUREMENTUNIT_PICAS = UNIT_PICAS , MEASUREMENTUNIT_SPACES = UNIT_SPACES , MEASUREMENTUNIT_MILLIMETERS = 100
}
 Constants for Finale's standard measurement units. More...
 
- Protected Member Functions inherited from __FCBase
 __FCBase ()
 The constructor.
 

Detailed Description

Generic low-level Enigma data accessor for one data record.

This class provides direct access to the raw Enigma data for an EXTAG/EDataID location. It is intentionally low-level and may be more useful for testing and support than for modifying a file that you intend to use. However, it does provide access to data that the structured PDK Framework may have missed.

Practical workflow for scripts that do not have PDK documentation:

  • Use the free "Enigma File Dump" plugin to export a text dump of the current document (for example, a dump like MyDocument.txt).
  • In the dump, find the record you want and note:
    • the two-character tag code (such as CL, Sy, etc.),
    • the tag type (other/detail),
    • whether it is single-inci or multi-inci storage, and
    • the EDataID values.

There three EDataID layouts:

  • other: cmper/inci
  • detail: cmper1/cmper2/inci
  • entry detail: entry number/inci

Entry details do not have a separate data pool. Their entry numbers are packed into the same cmper1/cmper2 storage used by detail IDs.

Shortcut: if you already have a framework data object for the same record, use AssignTarget first to copy tag/id/version directly.

  • If you are targeting a particular Finale change, use the Enigma Dump plugin to dump files before and after the change. A comparison of the two shows you exactly what changed.

To locate the Enigma dump plugin in the future, web search is usually the most stable approach (for example: "Finale Plugin Enigma File Dump"). The download page is currently https://robertgpatterson.com/-fininfo/-downloads/download-free.html.

Constructor & Destructor Documentation

◆ FCRawData()

FCRawData::FCRawData ( )

The constructor.

Lua-supported (0.79).

Member Function Documentation

◆ AssignTarget()

bool FCRawData::AssignTarget ( __FCBaseData * pSource)

Copies EXTAG, EDataID, and Enigma version from a __FCBaseData object.

Lua-supported (0.79).

The source object does not need to be loaded.

Returns
true if the source object pointer is valid.

◆ ClassName()

const char * FCRawData::ClassName ( ) const
inlineoverridevirtual

Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child class.

Lua-supported.

Implements __FCBase.

◆ ClearData()

void FCRawData::ClearData ( )

Clears the stored raw payload.

Lua-supported (0.79).

◆ Create()

bool FCRawData::Create ( )

Creates a new record with current payload.

Lua-supported (0.79).

◆ Delete()

bool FCRawData::Delete ( ) const

Deletes the current EXTAG/EDataID record.

Lua-supported (0.79).

◆ Exists()

bool FCRawData::Exists ( ) const

Returns true if the current target exists.

Lua-supported (0.79).

◆ GetByteCount()

int FCRawData::GetByteCount ( ) const
inline

Returns the number of stored bytes.

Lua-supported (read-only property, 0.79).

◆ GetByteTable()

std::vector< int > FCRawData::GetByteTable ( ) const

Returns payload bytes as integer values (0..255).

Lua-supported (read/write property, 0.79).

◆ GetClassID()

const PDKFRAMEWORK_CLASSID FCRawData::GetClassID ( ) const
inlineoverridevirtual

Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has problems to resolve the true classes of inherited objects.

This method must be overwritten by all child classes.

Lua-supported (also read-only property) (0.55).

Reimplemented from __FCBase.

◆ GetData()

std::string FCRawData::GetData ( ) const

Returns the stored payload as a binary string.

Lua-supported (read/write property, 0.79).

◆ GetDetailCmper1()

CMPER FCRawData::GetDetailCmper1 ( ) const
inline

Returns detail cmper1 from EDataID.

For entry-detail IDs, this is one part of the packed entry number.

Lua-supported (read-only property, 0.79).

◆ GetDetailCmper2()

CMPER FCRawData::GetDetailCmper2 ( ) const
inline

Returns detail cmper2 from EDataID.

For entry-detail IDs, this is one part of the packed entry number.

Lua-supported (read-only property, 0.79).

◆ GetDetailInci()

twobyte FCRawData::GetDetailInci ( ) const
inline

Returns detail inci from EDataID.

Lua-supported (read-only property, 0.79).

◆ GetEntryDetailEntryNumber()

ENTNUM FCRawData::GetEntryDetailEntryNumber ( ) const
inline

Returns entry number from EDataID.

This reads the packed entry-detail value stored in cmper1/cmper2.

Lua-supported (read-only property, 0.79).

◆ GetEntryDetailInci()

twobyte FCRawData::GetEntryDetailInci ( ) const
inline

Returns entry detail inci from EDataID.

Lua-supported (read-only property, 0.79).

◆ GetFourByte()

int FCRawData::GetFourByte ( int byteOffset) const

Reads a signed 32-bit value at the given byte offset.

Lua-supported (0.79).

Byte-order conversion is handled internally.

Returns
0 if offset is out-of-range.

◆ GetFourByteTable()

std::vector< int > FCRawData::GetFourByteTable ( ) const

Returns payload as little-endian signed 32-bit values.

Lua-supported (read/write property, 0.79).

◆ GetIncisPerStruct()

int FCRawData::GetIncisPerStruct ( ) const

Returns the configured incidences-per-struct implied by current tag data type.

Lua-supported (read-only property, 0.79).

Returns 1 for non-multi-inci data types.

◆ GetOtherCmper()

CMPER FCRawData::GetOtherCmper ( ) const
inline

Returns the "other" cmper value from EDataID.

Lua-supported (read-only property, 0.79).

◆ GetOtherInci()

twobyte FCRawData::GetOtherInci ( ) const
inline

Returns the "other" inci value from EDataID.

Lua-supported (read-only property, 0.79).

◆ GetTag()

EXTAG FCRawData::GetTag ( ) const
inline

Returns the EXTAG value.

Lua-supported (read/write property, 0.79).

◆ GetTagChars()

std::string FCRawData::GetTagChars ( ) const

Returns the two-character low-word tag code of the current EXTAG.

Lua-supported (read-only property, 0.79).

◆ GetTagDataType()

ETAG FCRawData::GetTagDataType ( ) const
inline

Returns the top-word data type of the current EXTAG (for example edOther).

Lua-supported (read-only property, 0.79).

◆ GetTwoByteTable()

std::vector< int > FCRawData::GetTwoByteTable ( ) const

Returns payload as little-endian 16-bit values (0..65535).

Lua-supported (read/write property, 0.79).

◆ GetVersion()

EVERSION FCRawData::GetVersion ( ) const
inline

Returns the Enigma version used in FX_*EData calls.

Lua-supported (read/write property, 0.79).

◆ Load()

bool FCRawData::Load ( )

Loads the record by first querying its raw size.

Lua-supported (0.79).

◆ LoadNextInci()

bool FCRawData::LoadNextInci ( )

Increments current inci and attempts to load the next record.

Lua-supported (0.79).

Supports "other", "detail", and "entry detail" storage types.

Returns
false on unsupported tag type or if no record exists at next inci.

◆ LoadWithExpectedSize()

bool FCRawData::LoadWithExpectedSize ( int expectedByteCount)

Loads the record and verifies an exact byte size match.

Lua-supported (0.79).

Returns
false if load fails or loaded size differs from expectedByteCount.

◆ LoadWithSize()

bool FCRawData::LoadWithSize ( int byteCount)

Loads the record using a caller-provided byte size.

Lua-supported (0.79).

◆ MakeDetailTag()

EXTAG FCRawData::MakeDetailTag ( const std::string & tagChars,
int incisPerStruct = 1 )
static

Makes an EXTAG for detail data from two tag characters and optional incis-per-struct.

Lua-supported (0.79).

Parameters
tagCharsExactly 2 characters.
incisPerStructNumber of incidences per stored struct. 1 means regular edDetail.

◆ MakeEntryDetailTag()

EXTAG FCRawData::MakeEntryDetailTag ( const std::string & tagChars,
int incisPerStruct = 1 )
static

Makes an EXTAG for entry detail data from two tag characters and optional incis-per-struct.

Lua-supported (0.79).

Parameters
tagCharsExactly 2 characters.
incisPerStructNumber of incidences per stored struct. 1 means regular edEntryDetail.

◆ MakeOtherTag()

EXTAG FCRawData::MakeOtherTag ( const std::string & tagChars,
int incisPerStruct = 1 )
static

Makes an EXTAG for other data from two tag characters and optional incis-per-struct.

Lua-supported (0.79).

Parameters
tagCharsExactly 2 characters.
incisPerStructNumber of incidences per stored struct. 1 means regular edOther.

◆ Save()

bool FCRawData::Save ( ) const

Saves current payload to current EXTAG/EDataID location.

Lua-supported (0.79).

◆ SetByteTable()

void FCRawData::SetByteTable ( const std::vector< int > & table)

Sets payload bytes from integer values (0..255).

Lua-supported (read/write property, 0.79).

◆ SetData()

void FCRawData::SetData ( const std::string & data)

Sets the stored payload from a binary string.

Lua-supported (read/write property, 0.79).

◆ SetDataIDAsDetail()

void FCRawData::SetDataIDAsDetail ( CMPER cmper1,
CMPER cmper2,
twobyte inci = 0 )

Sets the EDataID as a "detail" ID.

Detail and entry detail share the same cmper1/cmper2/inci EDataID storage. Use SetDataIDAsEntryDetail when your tag is entry-detail data.

Lua-supported (0.79).

◆ SetDataIDAsEntryDetail()

void FCRawData::SetDataIDAsEntryDetail ( ENTNUM entryNumber,
twobyte inci = 0 )

Sets the EDataID as an "entry detail" ID.

This packs the entry number into the shared detail cmper1/cmper2 fields.

Lua-supported (0.79).

◆ SetDataIDAsOther()

void FCRawData::SetDataIDAsOther ( CMPER cmper,
twobyte inci = 0 )

Sets the EDataID as an "other" ID.

Lua-supported (0.79).

◆ SetFourByte()

bool FCRawData::SetFourByte ( int byteOffset,
int value )

Writes a signed 32-bit value at the given byte offset.

Lua-supported (0.79).

Byte-order conversion is handled internally.

Returns
false if offset is out-of-range.

◆ SetFourByteTable()

void FCRawData::SetFourByteTable ( const std::vector< int > & table)

Sets payload from little-endian signed 32-bit values.

Lua-supported (read/write property, 0.79).

◆ SetTag()

void FCRawData::SetTag ( EXTAG tag)
inline

Sets the EXTAG value.

Lua-supported (read/write property, 0.79).

◆ SetTagAsDetail()

void FCRawData::SetTagAsDetail ( const std::string & tagChars,
int incisPerStruct = 1 )

Sets current tag using MakeDetailTag.

Lua-supported (0.79).

◆ SetTagAsEntryDetail()

void FCRawData::SetTagAsEntryDetail ( const std::string & tagChars,
int incisPerStruct = 1 )

Sets current tag using MakeEntryDetailTag.

Lua-supported (0.79).

◆ SetTagAsOther()

void FCRawData::SetTagAsOther ( const std::string & tagChars,
int incisPerStruct = 1 )

Sets current tag using MakeOtherTag.

Lua-supported (0.79).

◆ SetTargetAsDetail()

void FCRawData::SetTargetAsDetail ( const std::string & tagChars,
CMPER cmper1,
CMPER cmper2,
twobyte inci = 0,
int incisPerStruct = 1 )

Convenience helper: sets tag and EDataID for a "detail" target in one call.

Lua-supported (0.79).

◆ SetTargetAsEntryDetail()

void FCRawData::SetTargetAsEntryDetail ( const std::string & tagChars,
ENTNUM entryNumber,
twobyte inci = 0,
int incisPerStruct = 1 )

Convenience helper: sets tag and EDataID for an "entry detail" target in one call.

Lua-supported (0.79).

◆ SetTargetAsOther()

void FCRawData::SetTargetAsOther ( const std::string & tagChars,
CMPER cmper,
twobyte inci = 0,
int incisPerStruct = 1 )

Convenience helper: sets tag and EDataID for an "other" target in one call.

Lua-supported (0.79).

◆ SetTwoByteTable()

void FCRawData::SetTwoByteTable ( const std::vector< int > & table)

Sets payload from little-endian 16-bit values (0..65535).

Lua-supported (read/write property, 0.79).

◆ SetVersion()

void FCRawData::SetVersion ( EVERSION version)
inline

Sets the Enigma version used in FX_*EData calls.

Lua-supported (read/write property, 0.79).