Beispiel #1
0
/// 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());
}
/// 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());
}
Beispiel #3
0
// 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());
}
Beispiel #4
0
// 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);
}