MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / write

Method write

SRC/handler/XmlFileStream.cpp:634–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634int
635XmlFileStream::write(Vector &data)
636{
637 if (fileOpen == 0)
638 this->open();
639
640 //
641 // if not parallel, just write the data
642 //
643
644 if (sendSelfCount == 0) {
645 numDataRows++;
646
647 if (attributeMode == true) {
648 theFile << ">\n";
649 attributeMode = false;
650 numIndent++;
651 }
652
653 this->indent();
654 (*this) << data;
655 return 0;
656 }
657
658 //
659 // otherwise parallel
660 //
661
662
663 //
664 // process xml info in the files
665 //
666
667
668 //
669 // send data if not p0
670
671 if (sendSelfCount < 0) {
672 if (data.Size() != 0) {
673 theChannels[0]->sendVector(0, 0, data);
674 return 0;
675 } else {
676 return 0;
677 }
678 }
679
680 //
681 // if p0 recv the data & write it out sorted
682 //
683
684 // recv data
685
686 numDataRows++;
687
688 if (attributeMode == true) {
689 theFile << ">\n";
690 attributeMode = false;
691 numIndent++;

Callers 2

XmlFileStream.cppFile · 0.45
mergeXMLMethod · 0.45

Calls 5

openMethod · 0.95
indentMethod · 0.95
SizeMethod · 0.45
sendVectorMethod · 0.45
recvVectorMethod · 0.45

Tested by

no test coverage detected