void Constraint::Save (Writer &writer) const { std::string encodeName = encodeAttribute(Name); writer.Stream() << writer.ind() << "<Constrain " << "Name=\"" << encodeName << "\" " << "Type=\"" << (int)Type << "\" "; if(this->Type==InternalAlignment) writer.Stream() << "InternalAlignmentType=\"" << (int)AlignmentType << "\" " << "InternalAlignmentIndex=\"" << InternalAlignmentIndex << "\" "; writer.Stream() << "Value=\"" << Value << "\" " << "First=\"" << First << "\" " << "FirstPos=\"" << (int) FirstPos << "\" " << "Second=\"" << Second << "\" " << "SecondPos=\"" << (int) SecondPos << "\" " << "Third=\"" << Third << "\" " << "ThirdPos=\"" << (int) ThirdPos << "\" " << "LabelDistance=\"" << LabelDistance << "\" " << "LabelPosition=\"" << LabelPosition << "\" " << "IsDriving=\"" << (int)isDriving << "\" " << "IsInVirtualSpace=\"" << (int)isInVirtualSpace << "\" />" << std::endl; }
void Command::Save (Writer &writer) const { // this will only get used if saved as XML (probably never) writer.Stream() << writer.ind() << "<Command " << "gcode=\"" << toGCode() << "\" />"; writer.Stream()<< std::endl; }
void PropertyConstraintList::Save(Writer &writer) const { writer.Stream() << writer.ind() << "<ConstraintList count=\"" << getSize() <<"\">" << endl; writer.incInd(); for (int i = 0; i < getSize(); i++) _lValueList[i]->Save(writer); writer.decInd(); writer.Stream() << writer.ind() << "</ConstraintList>" << endl ; }
void Trajectory::Save (Writer &writer) const { writer.Stream() << writer.ind() << "<Trajectory count=\"" << getSize() <<"\">" << std::endl; writer.incInd(); for(unsigned int i = 0;i<getSize(); i++) vpcWaypoints[i]->Save(writer); writer.decInd(); writer.Stream() << writer.ind() << "</Trajectory>" << std::endl ; }
void PropertyGeometryList::Save(Writer &writer) const { writer.Stream() << writer.ind() << "<GeometryList count=\"" << getSize() <<"\">" << endl; writer.incInd(); for (int i = 0; i < getSize(); i++) { writer.Stream() << writer.ind() << "<Geometry type=\"" << _lValueList[i]->getTypeId().getName() << "\">" << endl;; writer.incInd(); _lValueList[i]->Save(writer); writer.decInd(); writer.Stream() << writer.ind() << "</Geometry>" << endl; } writer.decInd(); writer.Stream() << writer.ind() << "</GeometryList>" << endl ; }
void Waypoint::Save (Writer &writer) const { writer.Stream() << writer.ind() << "<Waypoint " << "name=\"" << Name << "\" " << "Px=\"" << EndPos.getPosition().x << "\" " << "Py=\"" << EndPos.getPosition().y << "\" " << "Pz=\"" << EndPos.getPosition().z << "\" " << "Q0=\"" << EndPos.getRotation()[0] << "\" " << "Q1=\"" << EndPos.getRotation()[1] << "\" " << "Q2=\"" << EndPos.getRotation()[2] << "\" " << "Q3=\"" << EndPos.getRotation()[3] << "\" " << "vel=\"" << Velocity << "\" " << "acc=\"" << Accelaration << "\" " << "cont=\"" << int((Cont)?1:0) << "\" " << "tool=\"" << Tool << "\" " << "base=\"" << Base << "\" "; if(Type == Waypoint::PTP) writer.Stream() << " type=\"PTP\"/> "; else if(Type == Waypoint::LINE) writer.Stream() << " type=\"LIN\"/> "; else if(Type == Waypoint::CIRC) writer.Stream() << " type=\"CIRC\"/> "; else if(Type == Waypoint::WAIT) writer.Stream() << " type=\"WAIT\"/> "; else if(Type == Waypoint::UNDEF) writer.Stream() << " type=\"UNDEF\"/> "; writer.Stream()<< std::endl; }