Exemplo n.º 1
0
void Visitor<Reader<DataStream>>::readFrom(const TimenodeProperties& timenodeProperties)
{
    m_stream << timenodeProperties.oldDate
             << timenodeProperties.newDate;

    insertDelimiter();
}
Exemplo n.º 2
0
void Visitor<Reader<DataStream>>::readFrom_impl(
        const Dummy::DummyModel& proc)
{
    readFrom(*proc.pluginModelList);

    insertDelimiter();
}
Exemplo n.º 3
0
void Visitor<Reader<DataStream>>::readFrom(const JSProcessModel& proc)
{
    readFrom(*proc.pluginModelList);

    m_stream << proc.m_script;

    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom_impl(const Ossia::OSCSpecificSettings& n)
{
    // TODO put it in the right order before 1.0 final.
    // TODO same for minuit, etc..
    m_stream << n.outputPort
             << n.inputPort
             << n.host;
    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom_impl(
        const Network::NetworkDocumentPlugin& elt)
{
    readFrom(*elt.groupManager());
    readFrom(*elt.policy());

    // Note : we do not save the policy since it will be different on each computer.
    insertDelimiter();
}
Exemplo n.º 6
0
void Visitor<Reader<DataStream>>::readFrom(const ModelMetadata& md)
{
    m_stream << md.m_scriptingName
             << md.m_comment
             << md.m_color
             << md.m_label;

    insertDelimiter();
}
Exemplo n.º 7
0
template<> void Visitor<Reader<DataStream>>::readFrom(const Scenario::BaseScenario& base_scenario)
{
    readFrom(static_cast<const IdentifiedObject<Scenario::BaseScenario>&>(base_scenario));
    readFrom(static_cast<const Scenario::BaseScenarioContainer&>(base_scenario));

    readFrom(base_scenario.pluginModelList);

    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom(const AutomationModel& autom)
{
    readFrom(*autom.pluginModelList);

    m_stream << autom.address();
    m_stream << autom.min();
    m_stream << autom.max();
    readFrom(autom.curve());

    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom(
        const Space::ViewportModel& vp)
{
    readFrom(static_cast<const IdentifiedObject<Space::ViewportModel>&>(vp));
    m_stream
            << vp.name()
            << vp.transform()
            << vp.xDim()
            << vp.yDim()
            << vp.m_defaultValuesMap
            << vp.renderPrecision();

    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom(const ScenarioModel& scenario)
{
    readFrom(*scenario.pluginModelList);

    m_stream << scenario.m_startTimeNodeId
             << scenario.m_endTimeNodeId;
    m_stream << scenario.m_startEventId
             << scenario.m_endEventId;

    // Timenodes
    const auto& timenodes = scenario.timeNodes();
    m_stream << (int) timenodes.size();

    for(const auto& timenode : timenodes)
    {
        readFrom(*timenode);
    }

    // Events
    const auto& events = scenario.events();
    m_stream << (int) events.size();

    for(const auto& event : events)
    {
        readFrom(*event);
    }

    // States
    const auto& states = scenario.states();
    m_stream << (int) states.size();

    for(const auto& state : states)
    {
        readFrom(*state);
    }

    // Constraints
    const auto& constraints = scenario.constraints();
    m_stream << (int) constraints.size();

    for(const auto& constraint : constraints)
    {
        readFrom(*constraint);
    }



    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom(const CurveSegmentModel& segmt)
{
    // To allow recration using createProcess
    m_stream << segmt.name();

    // Save the parent class
    readFrom(static_cast<const IdentifiedObject<CurveSegmentModel>&>(segmt));

    // Save this class (this will be loaded by writeTo(*this) in CurveSegmentModel ctor
    m_stream << segmt.previous() << segmt.following()
             << segmt.start() << segmt.end();

    // Save the subclass
    segmt.serialize(toVariant());

    insertDelimiter();
}
Exemplo n.º 12
0
ISCORE_LIB_DEVICE_EXPORT void Visitor<Reader<DataStream>>::readFrom(const Device::DeviceSettings& n)
{
    m_stream << n.name
             << n.protocol;

    // TODO try to see if this pattern is refactorable with the similar thing
    // usef for CurveSegmentData.

    auto& pl = context.components.factory<Device::DynamicProtocolList>();
    auto prot = pl.get(n.protocol);
    if(prot)
    {
        prot->serializeProtocolSpecificSettings(n.deviceSpecificSettings, this->toVariant());
    }
    else
    {
        qDebug() << "Warning: could not serialize device " << n.name;
    }

    insertDelimiter();
}
Exemplo n.º 13
0
ISCORE_PLUGIN_SCENARIO_EXPORT void Visitor<Reader<DataStream>>::readFrom(const Scenario::StateModel& s)
{
    readFrom(static_cast<const IdentifiedObject<Scenario::StateModel>&>(s));

    // Common metadata
    readFrom(s.metadata);

    m_stream << s.m_eventId
             << s.m_previousConstraint
             << s.m_nextConstraint
             << s.m_heightPercentage;

    // Message tree
    m_stream << s.m_messageItemModel->rootNode();

    // Processes plugins
    m_stream << (int32_t) s.stateProcesses.size();
    for(const auto& process : s.stateProcesses)
    {
        readFrom(process);
    }

    insertDelimiter();
}
Exemplo n.º 14
0
void DataStreamReader::read(const Media::Merger::Model& proc)
{
  readPorts(*this, proc.m_inlets, proc.m_outlets);
  m_stream << proc.m_inCount;
  insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom(const VerticalExtent& ve)
{
    m_stream << ve.point;
    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom(const Audio::Mix::Routing& proc)
{
    m_stream << proc.in << proc.out << proc.mix << proc.enabled;

    insertDelimiter();
}
void DataStreamReader::read(const Protocols::OSCQuerySpecificSettings& n)
{
  m_stream << n.host << n.rate;
  insertDelimiter();
}
Exemplo n.º 18
0
void DataStreamReader::read(
        const PresetState::Model& proc)
{
    m_stream << proc.m_file;
    insertDelimiter();
}
void Visitor<Reader<DataStream>>::readFrom(const GroupMetadata& elt)
{
    readFrom(elt.group());
    insertDelimiter();
}
Exemplo n.º 20
0
SCORE_LIB_STATE_EXPORT void DataStreamReader::read(const State::Address& a)
{
  m_stream << a.device << a.path;
  insertDelimiter();
}