// Serialize Functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool System::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Jan 14, 2005 stream.WriteMFCRect(m_rect); wxCHECK(stream.CheckState(), false); // Note: End bar is stored as a byte; we use Barline class to make it easier // for the user wxByte endBar = (wxByte)((m_endBar.GetType() << 5) | (m_endBar.GetRepeatCount())); stream << endBar << m_positionSpacing << m_rhythmSlashSpacingAbove << m_rhythmSlashSpacingBelow << m_extraSpacing; wxCHECK(stream.CheckState(), false); m_startBar.Serialize(stream); wxCHECK(stream.CheckState(), false); m_directionArray.Serialize(stream); wxCHECK(stream.CheckState(), false); m_chordTextArray.Serialize(stream); wxCHECK(stream.CheckState(), false); m_rhythmSlashArray.Serialize(stream); wxCHECK(stream.CheckState(), false); m_staffArray.Serialize(stream); wxCHECK(stream.CheckState(), false); m_barlineArray.Serialize(stream); wxCHECK(stream.CheckState(), false); return (stream.CheckState()); }
// Serialize Functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool GuitarIn::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Jan 25, 2005 stream << m_system << m_staff << m_position << m_data; wxCHECK(stream.CheckState(), false); return (stream.CheckState()); }
// Serialize Functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool ChordDiagram::Serialize(PowerTabOutputStream& stream) const { m_chordName.Serialize(stream); PTB_CHECK_THAT(stream.CheckState(), false); stream << m_topFret; PTB_CHECK_THAT(stream.CheckState(), false); stream.WriteSmallVector(m_fretNumberArray); return stream.CheckState(); }
// Serialization Functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool ChordText::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Jan 3, 2005 stream << m_position; wxCHECK(stream.CheckState(), false); m_chordName.Serialize(stream); wxCHECK(stream.CheckState(), false); return (stream.CheckState()); }
// Serialize Functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool SystemSymbol::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Jan 13, 2005 stream << m_system << m_position << m_data; wxCHECK(stream.CheckState(), false); return (stream.CheckState()); }
// Serialization functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool RhythmSlash::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Dec 17, 2004 stream << m_position << m_beaming << m_data; wxCHECK(stream.CheckState(), false); return (stream.CheckState()); }
/// Writes the MFC class information for the object to a Power Tab output stream /// @param stream Power Tab output stream to write to /// @return True if the class information was written, false if not bool PowerTabObject::WriteMFCClassInformation(PowerTabOutputStream& stream) const { //------Last Checked------// // - Dec 24, 2004 wxString className = GetMFCClassName(); wxWord schema = GetMFCClassSchema(); wxWord classNameLength = (wxWord)className.Length(); // Write the schema and the length of the class name stream << schema << classNameLength; wxCHECK(stream.CheckState(), false); // Write the class name // Note: all MFC class names are stored as ANSI text if (!stream.WriteAnsiText(className)) return (false); return (stream.CheckState()); }
// Serialize Functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool Direction::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Jan 11, 2005 stream << m_position; wxCHECK(stream.CheckState(), false); size_t symbolCount = GetSymbolCount(); stream << (wxByte)symbolCount; wxCHECK(stream.CheckState(), false); size_t i = 0; for (; i < symbolCount; i++) { stream << m_symbolArray[i]; wxCHECK(stream.CheckState(), false); } return (stream.CheckState()); }
// Serialize Functions /// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool ChordDiagram::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Jan 14, 2005 m_chordName.Serialize(stream); wxCHECK(stream.CheckState(), false); stream << m_topFret; wxCHECK(stream.CheckState(), false); size_t count = GetStringCount(); stream << (wxByte)count; wxCHECK(stream.CheckState(), false); size_t i = 0; for (; i < count; i++) { stream << m_fretNumberArray[i]; wxCHECK(stream.CheckState(), false); } return (true); }
/// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool FloatingText::DoSerialize(PowerTabOutputStream & stream) { //------Last Checked------// // - Dec 7, 2004 stream.WriteMFCString(m_text); wxCHECK(stream.CheckState(), false); stream.WriteMFCRect(m_rect); wxCHECK(stream.CheckState(), false); stream << m_flags; wxCHECK(stream.CheckState(), false); m_fontSetting.Serialize(stream); wxCHECK(stream.CheckState(), false); return (stream.CheckState()); }
/// Performs serialization for the class /// @param stream Power Tab output stream to serialize to /// @return True if the object was serialized, false if not bool FontSetting::DoSerialize(PowerTabOutputStream& stream) { //------Last Checked------// // - Dec 5, 2004 stream.WriteMFCString(m_faceName); wxCHECK(stream.CheckState(), false); stream << m_pointSize << m_weight << m_italic << m_underline << m_strikeOut; wxCHECK(stream.CheckState(), false); stream.WriteWin32ColorRef(m_color); wxCHECK(stream.CheckState(), false); return (stream.CheckState()); }