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

Method setDatabase

SRC/handler/DatabaseStream.cpp:96–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95
96int
97DatabaseStream::setDatabase(FE_Datastore &database, const char *tName)
98{
99 if (tName == 0 || strlen(tName) == 0) {
100 opserr << "DatabaseStream::DatabaseStream - no tableName passed\n";
101 return -1;
102 }
103
104 if (tableName != 0)
105 delete [] tableName;
106
107 tableName = new char [strlen(tName)+1];
108 strcpy(tableName, tName);
109 if (tableName == 0) {
110 opserr << "DatabaseStream::DatabaseStream - out of memory creating copy of tableName: " << tName << endln;
111 return -1;
112 }
113
114 theDatabase = &database;
115 return 0;
116}
117
118
119int

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by 1

mainFunction · 0.36