Programmer Guide/Macro Library/BDataSet: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
Line 21: Line 21:


===Public Functions===
===Public Functions===
 
====AddASet====
====Construct====
====CreateWave====
====CreateWaveEx====
====DeleteWave====
====Destruct====
====Detach====
====AFileIsLinked====
====BackupEmpty====
====BackupLoad====
====BackupSave====
====EvalSegment====
====ExportSD0====
====FindSegment====
====GetASetInfo====
====GetBaseDirectory====
====GetPath====
====GetSegment====
====GetSegment====
Get attributes of segment.
Get attributes of segment.
Line 61: Line 77:
:To select the database element of a segment, an empty attribute list can be used
:To select the database element of a segment, an empty attribute list can be used
:If an empty attributelist is used, the result is set to '*' to indicate success
:If an empty attributelist is used, the result is set to '*' to indicate success
 
====ImportSD0====
====ImportXML====
====IsLinked====
====IsNewFile====
====IsRelative====
====Load====
====OpenAutoAFile====
====OpenAutoAFileEx====
====RemoveTmpSet====
====RestoreTmpSet====
====Save====
====SelectASeg====
====SelectASeg====
Select a segment.
Select a segment.
Line 68: Line 94:
;aseg:XML position, IREF or ID of a segment
;aseg:XML position, IREF or ID of a segment
;result:0 or errorcode
;result:0 or errorcode
====SelectASet====
====SetLink====
====SetRelativity====
====SetSegment====
====Validate====





Revision as of 13:23, 10 January 2017

This STx-related article may be outdated.

This class implements the XML Project document. The Project document is the global database available to all STx applications and scripts and contains all data and links of the current project. The programmer must not create or destroy the project object because these functions are performed by the application startup and cleanup macros. So, deleting them manually would cause them to be deleted twice, causing the need for a new instance to be created for no instance to be left.

At application startup a BDATASET instance is created and linked to the global Project document which is created and managed by the STx master shell and/or the application Project. The name of this instance is stored in the shell variable BDATASET. This object must be used to access the project document.

Never ever call the member functions CONSTRUCT, DESTRUCT or CLOSE!

If the project content is changed by a command (or during a block of commands), or if a longer operation is performed on the project, the ATTACH and DETACH functions should be called:

$bdataset ATTACH

 // ...project commands...

$bdataset DETACH

No static commands are implemented; a call to the macro BDataSet (e.g. bdataset save) will do nothing, returning an empty string.

The class BDataSet is derived from the class BXMLDoc.

Beware of using the base class functions, since they do not update the BDataSet member variables!

Public Functions

AddASet

Construct

CreateWave

CreateWaveEx

DeleteWave

Destruct

Detach

AFileIsLinked

BackupEmpty

BackupLoad

BackupSave

EvalSegment

ExportSD0

FindSegment

GetASetInfo

GetBaseDirectory

GetPath

GetSegment

Get attributes of segment.

instance GETSEGMENT aset; aseg; attr1; ...
aset
audio set reference (iref | xmlPos | *)
aseg
segment reference or name of segment
attrX
requested attribute
attrX valueX
ID or NAME segmentname
IREF iref of segment (reference)
SEGMENT [unit] segmentexpression
POSITION or BEGIN [unit] begin
END [unit] end
LENGTH [unit] length
CHANNEL channel-number (* for all channels)
attribute attributevalue
result
empty string on error or requested attributes (separated by semi-colons if more than 1)
notes
If the segment was found, the database position is set to the segment element
To select the database element of a segment, an empty attribute list can be used
If an empty attributelist is used, the result is set to '*' to indicate success

ImportSD0

ImportXML

IsLinked

IsNewFile

IsRelative

Load

OpenAutoAFile

OpenAutoAFileEx

RemoveTmpSet

RestoreTmpSet

Save

SelectASeg

Select a segment.

$bdataset SELECTASEG aset; aseg
aset
audio set reference
aseg
XML position, IREF or ID of a segment
result
0 or errorcode

SelectASet

SetLink

SetRelativity

SetSegment

Validate

  • File: BDATASET.STX, linked to library STX.LIB
  • Title: the project document.
  • Parent class: BXMLDoc

Navigation menu

Personal tools