Changeset 589
- Timestamp:
- Feb 23, 2007, 11:36:18 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/c-example/Makefile.in
r515 r589 28 28 all: $(PROGS) 29 29 30 compress: compress.cc 31 if test "`uname`" == "Darwin"; then \ 32 $(CXX) $(DEBUG) $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE_MAC); \ 33 else \ 34 $(CXX) $(DEBUG) $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE); \ 35 fi 36 37 compressc: compress.c 38 if test "`uname`" == "Darwin"; then \ 39 $(CC) $(DEBUG) $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE_MAC); \ 40 else \ 41 $(CC) $(DEBUG) $(INCL_FILES) -o $@ $< $(LIB_RAPPTURE); \ 42 fi 43 30 44 plot: plot.cc 31 45 if test "`uname`" == "Darwin"; then \ -
trunk/src/cee/RpLibraryCInterface.cc
r157 r589 146 146 147 147 int 148 rpPut (RpLibrary* lib,149 150 151 152 int append)148 rpPut ( RpLibrary* lib, 149 const char* path, 150 const char* value, 151 const char* id, 152 unsigned int append ) 153 153 { 154 154 int retVal = 0; … … 157 157 } 158 158 159 /* 160 int 161 rpPutStringId (RpLibrary* lib, 162 const char* path, 163 const char* value, 164 const char* id, 165 int append ) 166 { 167 int retVal = 0; 168 lib->put(path,value,id,append); 169 return retVal; 170 } 171 */ 172 173 int 174 rpPutString ( RpLibrary* lib, 175 const char* path, 176 const char* value, 177 int append ) 159 int 160 rpPutString ( RpLibrary* lib, 161 const char* path, 162 const char* value, 163 unsigned int append ) 178 164 { 179 165 int retVal = 0; … … 182 168 } 183 169 184 /* 185 int 186 rpPutDoubleId (RpLibrary* lib, 187 const char* path, 188 double value, 189 const char* id, 190 int append ) 191 { 192 int retVal = 0; 193 lib->put(path,value,id,append); 194 return retVal; 195 } 196 */ 197 198 int 199 rpPutDouble (RpLibrary* lib, 200 const char* path, 201 double value, 202 int append ) 170 int 171 rpPutDouble ( RpLibrary* lib, 172 const char* path, 173 double value, 174 unsigned int append ) 203 175 { 204 176 int retVal = 0; 205 177 lib->put(path,value,"",append); 178 return retVal; 179 } 180 181 int rpPutData ( RpLibrary* lib, 182 const char* path, 183 const char* bytes, 184 int nBytes, 185 unsigned int append ) 186 { 187 int retVal = 0; 188 lib->putData(path,bytes,nBytes,append); 189 return retVal; 190 } 191 192 int rpPutFile ( RpLibrary* lib, 193 const char* path, 194 const char* fileName, 195 unsigned int binary, 196 unsigned int append ) 197 { 198 int retVal = 0; 199 bool b = (binary == 0) ? true : false; 200 lib->putFile(path,fileName,b,append); 206 201 return retVal; 207 202 } -
trunk/src/cee/RpLibraryCInterface.h
r554 r589 5 5 * ====================================================================== 6 6 * AUTHOR: Derrick Kearney, Purdue University 7 * Copyright (c) 2004-200 5Purdue Research Foundation7 * Copyright (c) 2004-2007 Purdue Research Foundation 8 8 * 9 9 * See the file "license.terms" for information on usage and … … 23 23 24 24 // lib definition functions 25 //26 25 RpLibrary* rpLibrary (const char* path); 27 26 int rpFreeLibrary (RpLibrary** lib); 28 27 29 28 // RpLibrary member functions 30 RpLibrary* rpElement (RpLibrary* lib, const char* path);29 RpLibrary* rpElement (RpLibrary* lib, const char* path); 31 30 RpLibrary* rpElementAsObject (RpLibrary* lib, const char* path); 32 int rpElementAsType (RpLibrary* lib, const char* path, const char** retCStr);33 int rpElementAsComp (RpLibrary* lib, const char* path, const char** retCStr);34 int rpElementAsId (RpLibrary* lib, const char* path, const char** retCStr);31 int rpElementAsType (RpLibrary* lib, const char* path, const char** retCStr); 32 int rpElementAsComp (RpLibrary* lib, const char* path, const char** retCStr); 33 int rpElementAsId (RpLibrary* lib, const char* path, const char** retCStr); 35 34 36 35 RpLibrary* rpChildren (RpLibrary* lib, … … 42 41 const char* type ); 43 42 44 int rpGet (RpLibrary* lib, const char* path, const char** retCStr);45 int rpGetString (RpLibrary* lib, const char* path, const char** retCStr);46 int rpGetDouble (RpLibrary* lib, const char* path, double* retDVal);43 int rpGet (RpLibrary* lib, const char* path, const char** retCStr); 44 int rpGetString (RpLibrary* lib, const char* path, const char** retCStr); 45 int rpGetDouble (RpLibrary* lib, const char* path, double* retDVal); 47 46 48 47 int rpPut (RpLibrary* lib, … … 50 49 const char* value, 51 50 const char* id, 52 int append ); 53 /* 54 int rpPutStringId (RpLibrary* lib, 55 const char* path, 56 const char* value, 57 const char* id, 58 int append ); 59 */ 51 unsigned int append ); 52 60 53 int rpPutString (RpLibrary* lib, 61 54 const char* path, 62 55 const char* value, 63 int append ); 64 /* 65 int rpPutDoubleId (RpLibrary* lib, 66 const char* path, 67 double value, 68 const char* id, 69 int append ); 70 */ 56 unsigned int append ); 57 71 58 int rpPutDouble (RpLibrary* lib, 72 59 const char* path, 73 60 double value, 74 int append ); 61 unsigned int append ); 62 63 int rpPutData (RpLibrary* lib, 64 const char* path, 65 const char* bytes, 66 int nBytes, 67 unsigned int append ); 68 69 int rpPutFile (RpLibrary* lib, 70 const char* path, 71 const char* fileName, 72 unsigned int binary, 73 unsigned int append ); 75 74 76 75 int rpXml (RpLibrary* lib, const char** retCStr); -
trunk/src/core/RpLibrary.cc
r583 r589 14 14 #include "RpLibrary.h" 15 15 #include "RpEntityRef.h" 16 #include "RpBuffer.h"17 16 18 17 static RpEntityRef ERTranslator; … … 1341 1340 1342 1341 /**********************************************************************/ 1342 // METHOD: getData() 1343 /// Return a pointer and memory size of the object held at location 'path' 1344 /** 1345 */ 1346 1347 /* 1348 Rappture::Buffer& 1349 RpLibrary::getData (std::string path) 1350 { 1351 const char* retCStr = NULL; 1352 Rappture::Buffer buf; 1353 1354 if (!this->root) { 1355 // library doesn't exist, do nothing; 1356 return buf; 1357 } 1358 1359 retNode = _find(path,NO_CREATE_PATH); 1360 1361 if (retNode == NULL) { 1362 // need to raise error 1363 return buf; 1364 } 1365 1366 retCStr = scew_element_contents(retNode); 1367 1368 if (retCStr == NULL) { 1369 return buf; 1370 } 1371 1372 len = strlen(retCStr); 1373 buf.append(retCStr,len); 1374 return buf; 1375 } 1376 */ 1377 1378 1379 /**********************************************************************/ 1343 1380 // METHOD: put() 1344 1381 /// Put a string value into the xml. … … 1535 1572 1536 1573 RpLibrary& 1537 RpLibrary::put Data(std::string path,1574 RpLibrary::putFile (std::string path, 1538 1575 std::string fileName, 1539 1576 bool binary, -
trunk/src/core/RpLibrary.h
r583 r589 36 36 #include <iterator> 37 37 #include <cctype> 38 39 38 #include <list> 39 #include "RpBuffer.h" 40 40 41 41 /* indentation size (in whitespaces) */ … … 88 88 int getInt ( std::string path = ""); 89 89 bool getBool ( std::string path = ""); 90 // Rappture::Buffer& getData ( std::string path = "");90 // Rappture::Buffer& getData (std::string path); 91 91 92 92 /* … … 130 130 int append = RPLIB_OVERWRITE ); 131 131 132 RpLibrary& put Data( std::string path,132 RpLibrary& putFile( std::string path, 133 133 std::string fileName, 134 134 bool binary, -
trunk/src/tcl/tests/units.test
r568 r589 605 605 list [catch {Rappture::Units::convert 1cm -to /m2} msg] $msg 606 606 } {1 {Conversion unavailable: (cm) -> (m-2) 607 Please enter units of type / length(/A2,/in2,/m2)}}607 Please enter units of type /area (/A2,/in2,/m2)}} 608 608 609 609 #--------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.