14#ifdef PDK_FRAMEWORK_STREAMS
19#if FXT_VERSION > FINALEVERSION_26_3
20#if OPERATING_SYSTEM == WINDOWS
21#include "pragma_align_begin.h"
29 ECHAR path[ MAX_PATHNAME_LENGTH ];
33 for (
int i = 0; i <
sizeof(this->path); i++ )
38#include "pragma_align_end.h"
43#if OPERATING_SYSTEM == WINDOWS
44#include "pragma_align_begin.h"
52 WCHAR path[ MAX_PATHNAME_LENGTH ];
60 for (
int i = 0; i <
sizeof(this->path) /
sizeof(this->path[0]); i++ )
65#include "pragma_align_end.h"
81#if (FXT_VERSION < FINALEVERSION_25 || OPERATING_SYSTEM == WINDOWS)
82 FinPathSpec2009 _folderspec2009;
83#if FXT_VERSION >= FINALEVERSION_2012
84 FinPathSpec2012 _folderspec2012;
87#if FXT_VERSION >= FINALEVERSION_2025
88 FinPathSpec25 _folderspec2025;
95#ifndef DOXYGEN_SHOULD_IGNORE_THIS
97 bool _MakeFullPath(
FCString* pString);
102#
if FXT_VERSION < FINALEVERSION_2012
103 FinPathSpec2009* pFolder,
104#elif FXT_VERSION < FINALEVERSION_25
105 FinPathSpec2012* pFolder,
107 FinPathSpec25* pFolder,
113#if (FXT_VERSION < FINALEVERSION_25 || OPERATING_SYSTEM == WINDOWS)
114 switch (FCString::_GetFinPathVersion())
116 case FINALEVERSION_2009:
117 memcpy(&_folderspec2009, pFolder,
sizeof(_folderspec2009));
119#if FXT_VERSION >= FINALEVERSION_2012
120 case FINALEVERSION_2012:
121 memcpy(&_folderspec2012, pFolder,
sizeof(_folderspec2012));
124#if FXT_VERSION >= FINALEVERSION_2025
125 case FINALEVERSION_2025:
126 memcpy(&_folderspec2025, pFolder,
sizeof(_folderspec2025));
132 _folderspec2025 = *pFolder;
146#if FXT_VERSION < FINALEVERSION_25 || OPERATING_SYSTEM == WINDOWS
147 switch (FCString::_GetFinPathVersion())
149 case FINALEVERSION_2009:
150 memset(&_folderspec2009, 0,
sizeof(_folderspec2009));
152#if FXT_VERSION >= FINALEVERSION_2012
153 case FINALEVERSION_2012:
154 memset(&_folderspec2012, 0,
sizeof(_folderspec2012));
157#if FXT_VERSION >= FINALEVERSION_2025
158 case FINALEVERSION_2025:
159 memset(&_folderspec2025, 0,
sizeof(_folderspec2025));
164 _folderspec2025.finPathSpecType = 0;
165 _folderspec2025.SetCFURLRef(NULL);
174 if (_pFile) fclose(_pFile);
182 bool IsOpen() {
return (_pFile != NULL); }
191 WINCODE(
const WCHAR* pszMode)
192 MACCODE(
const char* pszMode)
207 if (!_MakeFullPath(pString)) pString->
Clear();
221#if FXT_VERSION < FINALEVERSION_2012
224#elif FXT_VERSION < FINALEVERSION_25
294 const char*
ClassName()
const override {
return "FCTextFileUTF8Stream"; }
297#if FXT_VERSION < FINALEVERSION_2012
300#elif FXT_VERSION < FINALEVERSION_25
338 int _parentinstrumentID;
339 int _defaultstaffpos;
346 const char*
ClassName()
const override {
return "FCPercussionNoteType"; }
351 _parentinstrumentID = 0;
352 _defaultstaffpos = 0;
368#ifndef DOXYGEN_SHOULD_IGNORE_THIS
371 void _SetInstrumentID(
int theID) { _instrumentID = theID; }
372 void _SetParentInstrumentID(
int theID) { _parentinstrumentID = theID; }
373 void _SetDefaultStaffPos(
int staffpos) { _defaultstaffpos = staffpos; }
374 void _SetGeneralMIDI(
int gmnote) { _generalMIDI = gmnote; }
375 void _SetGroupID(
int theID) { _groupID = theID; }
376 void _SetCopies(
int count) { _copies = count; }
377 void _SetCopyGroup(
bool state) { _copygroup = state; }
408 if (_instrumentID == 0)
return false;
409 if (_groupID == 0)
return false;
410 if (_name.
IsEmpty())
return false;
Base class for the Finale Framework classes.
Definition ff_base.h:71
__FCBase()
The constructor.
Definition ff_base.h:278
Abstract base class for streams.
Definition ff_stream.h:72
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition ff_basecollection.h:26
__FCBase * GetItemAt(int index) const
Returns the object at the index position. Index is 0-based.
Definition finaleframework.cpp:13767
Generic file stream class.
Definition ff_stream.h:80
FILE * _GetFILE()
For internal use only!
Definition ff_stream.h:179
virtual bool OpenWrite()=0
Opens the file for writing.
bool IsOpen()
Returns true if the file isn't closed.
Definition ff_stream.h:182
FCFileStream(FCString *pFolder, FCString *pFileName)
Constructor - folder string version. (This was a C string version for folders earlier....
Definition ff_stream.h:143
virtual bool OpenRead()=0
Opens the file for reading.
void GetFullPath(FCString *pString)
Fills the full path of the file.
Definition ff_stream.h:205
bool Close()
Closes the file.
Definition finaleframework.cpp:37629
FCFileStream(FinPathSpec25 *pFolder, FCString *pFileName)
The constructor.
Definition ff_stream.h:101
virtual ~FCFileStream()
The destructor.
Definition ff_stream.h:172
bool OpenFile()
Opens the file for a specific mode.
Definition finaleframework.cpp:37607
Class that contains one of Finale's global percussion note type definition.
Definition ff_stream.h:336
int GetDefaultStaffPos() const
Returns the default staff position for the percussion notehead (as a starting point for the perussion...
Definition ff_stream.h:387
int GetInstrumentID() const
Returns the instrument ID.
Definition ff_stream.h:381
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_stream.h:346
int GetGeneralMIDI() const
Returns the general MIDI number for the note, if available.
Definition ff_stream.h:393
int GetCopies() const
Returns the number of groups that the instrument should be copied to.
Definition ff_stream.h:399
int GetGroupID() const
Returns the group ID to where the instrument belongs.
Definition ff_stream.h:396
bool _IsValid()
For internal use only.
Definition ff_stream.h:406
int GetParentInstrumentID() const
Returns the parent instrument ID, which is used if the instrument ID can't be mapped.
Definition ff_stream.h:384
void FormatName(FCString *pString, int orderid, int grouporderid)
Formats a FCString object to produce a printable name for a percussion instrument/sound.
Definition finaleframework.cpp:37867
bool GetCopyGroup() const
Returns true if the instrument should be copied into multiple groups.
Definition ff_stream.h:402
A collection of FCPercussionNoteType objects, created by loading and parsing Finale's PercNoteTypes....
Definition ff_stream.h:422
bool FileIsAvailable()
Returns true if Finale provides a path to the PercNoteTypes.txt file.
Definition finaleframework.cpp:37908
bool IsLoaded()
Returns true if the note types have been loaded successfully.
Definition ff_stream.h:452
FCPercussionNoteTypes()
The constructor.
Definition ff_stream.h:426
int LoadAll()
Loads and parses all the lines in Finale's PercNoteTypes.txt file. The result is a collection of FCPe...
Definition finaleframework.cpp:37915
FCPercussionNoteType * GetItemAt(int index) const
Overridden GetItemAt method.
Definition ff_stream.h:449
FCPercussionNoteType * FindNoteType(FLAG_16 percnotetype)
Finds the a specific note type. If the instrument ID isn't found, the parent instrument ID is searche...
Definition finaleframework.cpp:38031
Collection class for FCSettingsPair objects.
Definition ff_basecollection.h:946
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1877
void SetString(const FCString *pString)
Copies a string.
Definition finaleframework.cpp:2398
void Clear()
Creates an empty string.
Definition ff_base.h:2391
bool IsEmpty() const
Returns true if the string is empty.
Definition ff_base.h:3179
Collection class for FCString class objects.
Definition ff_basecollection.h:1085
Class for text (byte) streams.
Definition ff_stream.h:218
virtual bool OpenRead()
Opens the file for reading.
Definition ff_stream.h:240
FCTextFileStream(FCString *pFolder, FCString *pFileName)
The constructor. NOTE: This has been changed to FCString in both arguments, since that would seem to ...
Definition ff_stream.h:235
FCStrings * ReadStrings()
Creates a FCStrings collection with all string lines. This might return NULL.
Definition finaleframework.cpp:37743
virtual FCString * ReadString()
Reads the next line from the stream and creates it as a string object. NULL on error.
Definition finaleframework.cpp:37710
virtual bool WriteSettingsPairs(FCSettingsPairs *pPairs)
Writes a collection of settings pairs (with carriage return between each pair). This is an abstract F...
Definition finaleframework.cpp:37782
virtual bool WriteStrings(FCStrings *pStrings)
Writes a collection of strings with a carriage return between the lines. C-string version.
Definition finaleframework.cpp:37762
virtual bool OpenWrite()
Opens the file for writing.
Definition ff_stream.h:248
virtual bool WriteText(FCString *pString)
Writes a text to the stream without any extra formatting. C-string version.
Definition finaleframework.cpp:37774
FCTextFileStream(FinPathSpec25 *pFolder, FCString *pFileName)
The FinPathSpec-based constructor.
Definition ff_stream.h:228
Class for UTF-8text streams.
Definition ff_stream.h:292
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_stream.h:294
bool WriteText(FCString *pString) override
Writes a text to the stream without any extra formatting. UTF-8 version.
Definition finaleframework.cpp:37816
FCTextFileUTF8Stream(FinPathSpec25 *pFolder, FCString *pFileName)
The FinPathSpec-based constructor.
Definition ff_stream.h:304
FCTextFileUTF8Stream(FCString *pFolder, FCString *pFileName)
The constructor.
Definition ff_stream.h:310
FCString * ReadString() override
Overridden method to support UTF-8 text conversion.
Definition finaleframework.cpp:37824
bool WriteStrings(FCStrings *pStrings) override
Writes a collection of strings with a carriage return between the lines. UTF-8 version.
Definition finaleframework.cpp:37804