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

Method attr

SRC/handler/XmlFileStream.cpp:525–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523}
524
525int
526XmlFileStream::attr(const char *name, int value)
527
528{ if (fileOpen == 0)
529 this->open();
530
531 // if (sendSelfCount == 0 ) {
532
533 theFile << " " << name << "=\"" << value << "\"";
534
535 /* } else {
536
537 static char intRep[30];
538 sprintf(intRep, "%d", value);
539
540 int nextXmlStringLength = xmlStringLength + strlen(name) + strlen(intRep) + 5;
541 char *nextXmlString = new char [nextXmlStringLength];
542
543 if (xmlString != 0) {
544 strncpy(nextXmlString, xmlString, xmlStringLength);
545 delete [] xmlString;
546 } else
547 nextXmlString[0]='\0';
548
549 xmlString = nextXmlString;
550 xmlStringLength = nextXmlStringLength;
551
552 strcat(xmlString, " ");
553 strcat(xmlString, name);
554 strcat(xmlString, "=\"");
555 strcat(xmlString, intRep);
556 strcat(xmlString, "\"");
557
558 }
559 */
560 return 0;
561}
562
563int
564XmlFileStream::attr(const char *name, double value)

Callers

nothing calls this directly

Calls 1

openMethod · 0.95

Tested by

no test coverage detected