14 #ifdef PDK_FRAMEWORK_STREAMS
29 #if (FXT_VERSION < FINALEVERSION_25 || OPERATING_SYSTEM == WINDOWS)
30 FinPathSpec2009 _folderspec2009;
31 #if FXT_VERSION >= FINALEVERSION_2012
32 FinPathSpec2012 _folderspec2012;
35 #if FXT_VERSION >= FINALEVERSION_2025
36 FinPathSpec25 _folderspec2025;
43 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
45 bool _MakeFullPath(
FCString* pString);
50 #
if FXT_VERSION < FINALEVERSION_2012
51 FinPathSpec2009* pFolder,
52 #elif FXT_VERSION < FINALEVERSION_25
53 FinPathSpec2012* pFolder,
55 FinPathSpec25* pFolder,
61 #if (FXT_VERSION < FINALEVERSION_25 || OPERATING_SYSTEM == WINDOWS)
62 switch (FCString::_GetFinPathVersion())
64 case FINALEVERSION_2009:
65 memcpy(&_folderspec2009, pFolder,
sizeof(_folderspec2009));
67 #if FXT_VERSION >= FINALEVERSION_2012
68 case FINALEVERSION_2012:
69 memcpy(&_folderspec2012, pFolder,
sizeof(_folderspec2012));
72 #if FXT_VERSION >= FINALEVERSION_2025
73 case FINALEVERSION_2025:
74 memcpy(&_folderspec2025, pFolder,
sizeof(_folderspec2025));
80 _folderspec2025 = *pFolder;
94 #if FXT_VERSION < FINALEVERSION_25 || OPERATING_SYSTEM == WINDOWS
95 switch (FCString::_GetFinPathVersion())
97 case FINALEVERSION_2009:
98 memset(&_folderspec2009, 0,
sizeof(_folderspec2009));
100 #if FXT_VERSION >= FINALEVERSION_2012
101 case FINALEVERSION_2012:
102 memset(&_folderspec2012, 0,
sizeof(_folderspec2012));
105 #if FXT_VERSION >= FINALEVERSION_2025
106 case FINALEVERSION_2025:
107 memset(&_folderspec2025, 0,
sizeof(_folderspec2025));
111 #else // Mac FXT_VERSION_25_BASE and greater
112 _folderspec2025.finPathSpecType = 0;
113 _folderspec2025.SetCFURLRef(NULL);
122 if (_pFile) fclose(_pFile);
130 bool IsOpen() {
return (_pFile != NULL); }
139 WINCODE(WCHAR* pszMode)
140 MACCODE(
const char* pszMode)
155 if (!_MakeFullPath(pString)) pString->
Clear();
169 #if FXT_VERSION < FINALEVERSION_2012
172 #elif FXT_VERSION < FINALEVERSION_25
243 #if FXT_VERSION < FINALEVERSION_2012
246 #elif FXT_VERSION < FINALEVERSION_25
284 int _parentinstrumentID;
285 int _defaultstaffpos;
295 _parentinstrumentID = 0;
296 _defaultstaffpos = 0;
312 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
315 void _SetInstrumentID(
int theID) { _instrumentID = theID; }
316 void _SetParentInstrumentID(
int theID) { _parentinstrumentID = theID; }
317 void _SetDefaultStaffPos(
int staffpos) { _defaultstaffpos = staffpos; }
318 void _SetGeneralMIDI(
int gmnote) { _generalMIDI = gmnote; }
319 void _SetGroupID(
int theID) { _groupID = theID; }
320 void _SetCopies(
int count) { _copies = count; }
321 void _SetCopyGroup(
bool state) { _copygroup = state; }
352 if (_instrumentID == 0)
return false;
353 if (_groupID == 0)
return false;
354 if (_name.
IsEmpty())
return false;
__FCBase * GetItemAt(int index)
Returns the object at the index position. Index is 0-based.
Definition: finaleframework.cpp:12797
bool IsOpen()
Returns true if the file isn't closed.
Definition: ff_stream.h:130
Generic file stream class.
Definition: ff_stream.h:27
int LoadAll()
Loads and parses all the lines in Finale's PercNoteTypes.txt file. The result is a collection of FCPe...
Definition: finaleframework.cpp:31787
Class that contains one of Finale's global percussion note type definition.
Definition: ff_stream.h:281
FCPercussionNoteTypes()
The constructor.
Definition: ff_stream.h:370
A collection of FCPercussionNoteType objects, created by loading and parsing Finale's PercNoteTypes...
Definition: ff_stream.h:365
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:31654
bool Close()
Closes the file.
Definition: finaleframework.cpp:31501
bool GetCopyGroup() const
Returns true if the instrument should be copied into multiple groups.
Definition: ff_stream.h:346
FCTextFileUTF8Stream(FCString *pFolder, FCString *pFileName)
The constructor.
Definition: ff_stream.h:256
void Clear()
Creates an empty string.
Definition: ff_base.h:1831
virtual FCString * ReadString()
Reads the next line from the stream and creates it as a string object. NULL on error.
Definition: finaleframework.cpp:31582
FCTextFileStream(FinPathSpec25 *pFolder, FCString *pFileName)
The FinPathSpec-based constructor.
Definition: ff_stream.h:176
void GetFullPath(FCString *pString)
Fills the full path of the file.
Definition: ff_stream.h:153
FCFileStream(FinPathSpec25 *pFolder, FCString *pFileName)
The constructor.
Definition: ff_stream.h:49
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:31739
__FCBase()
The constructor.
Definition: ff_base.h:247
virtual ~FCFileStream()
The destructor.
Definition: ff_stream.h:120
virtual bool OpenRead()
Opens the file for reading.
Definition: ff_stream.h:188
int GetDefaultStaffPos() const
Returns the default staff position for the percussion notehead (as a starting point for the perussion...
Definition: ff_stream.h:331
virtual bool WriteText(FCString *pString)
Writes a text to the stream without any extra formatting. C-string version.
Definition: finaleframework.cpp:31646
int GetGroupID() const
Returns the group ID to where the instrument belongs.
Definition: ff_stream.h:340
virtual bool WriteText(FCString *pString)
Writes a text to the stream without any extra formatting. UTF-8 version.
Definition: finaleframework.cpp:31688
void SetString(FCString *pString)
Copies a string.
Definition: finaleframework.cpp:2132
Class for text (byte) streams.
Definition: ff_stream.h:165
FILE * _GetFILE()
For internal use only!
Definition: ff_stream.h:127
FCPercussionNoteType * GetItemAt(int index)
Overridden GetItemAt method.
Definition: ff_stream.h:393
bool FileIsAvailable()
Returns true if Finale provides a path to the PercNoteTypes.txt file.
Definition: finaleframework.cpp:31780
FCTextFileUTF8Stream(FinPathSpec25 *pFolder, FCString *pFileName)
The FinPathSpec-based constructor.
Definition: ff_stream.h:250
virtual FCString * ReadString()
Overridden method to support UTF-8 text conversion.
Definition: finaleframework.cpp:31696
int GetCopies() const
Returns the number of groups that the instrument should be copied to.
Definition: ff_stream.h:343
Base class for the Finale Framework classes.
Definition: ff_base.h:47
virtual bool WriteStrings(FCStrings *pStrings)
Writes a collection of strings with a carriage return between the lines. C-string version...
Definition: finaleframework.cpp:31634
int GetGeneralMIDI() const
Returns the general MIDI number for the note, if available.
Definition: ff_stream.h:337
virtual bool OpenWrite()
Opens the file for writing.
Definition: ff_stream.h:196
Class for UTF-8text streams.
Definition: ff_stream.h:239
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
FCFileStream(FCString *pFolder, FCString *pFileName)
Constructor - folder string version. (This was a C string version for folders earlier.) NOTE: This has been changed to FCString in both arguments, since that would seem to be the easiest way to support Unicode paths.
Definition: ff_stream.h:91
virtual bool OpenWrite()=0
Opens the file for writing.
bool OpenFile()
Opens the file for a specific mode.
Definition: finaleframework.cpp:31479
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:31903
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:183
Collection class for FCString class objects.
Definition: ff_basecollection.h:924
bool _IsValid()
For internal use only.
Definition: ff_stream.h:350
virtual bool OpenRead()=0
Opens the file for reading.
int GetInstrumentID() const
Returns the instrument ID.
Definition: ff_stream.h:325
Collection class for FCSettingsPair objects.
Definition: ff_basecollection.h:787
bool IsLoaded()
Returns true if the note types have been loaded successfully.
Definition: ff_stream.h:396
Abstract base class for streams.
Definition: ff_stream.h:19
virtual bool WriteStrings(FCStrings *pStrings)
Writes a collection of strings with a carriage return between the lines. UTF-8 version.
Definition: finaleframework.cpp:31676
FCStrings * ReadStrings()
Creates a FCStrings collection with all string lines. This might return NULL.
Definition: finaleframework.cpp:31615
int GetParentInstrumentID() const
Returns the parent instrument ID, which is used if the instrument ID can't be mapped.
Definition: ff_stream.h:328
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition: ff_basecollection.h:24
bool IsEmpty()
Returns true if the string is empty.
Definition: ff_base.h:2461