Changeset 597 for trunk/src/octave
- Timestamp:
- Mar 1, 2007 11:24:02 AM (17 years ago)
- Location:
- trunk/src/octave
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/octave/rpLibPutFile.cc
r591 r597 3 3 * INTERFACE: Octave Rappture Library Source 4 4 * 5 * [err] = rpLibPutFile(libHandle,path,fileName, fileType,append)5 * [err] = rpLibPutFile(libHandle,path,fileName,compress,append) 6 6 * 7 7 * ====================================================================== … … 25 25 * 26 26 * FileName is the name of the file to import into the rappture object 27 * FileType is an integer representing the type of file to include, text28 * (use 0) or binary (use 1).27 * Compress is an integer telling if the provided data should be compressed 28 * (use 1) or left uncompressed (use 0). 29 29 * Append is an integer telling if this new data should overwrite 30 30 * (use 0) or be appended (use 1) to previous data in this node. … … 34 34 DEFUN_DLD (rpLibPutString, args, , 35 35 "-*- texinfo -*-\n\ 36 [err] = rpLibPutString(@var{libHandle},@var{path},@var{ value},@var{append})\n\36 [err] = rpLibPutString(@var{libHandle},@var{path},@var{fileName},@var{compress},@var{append})\n\ 37 37 \n\ 38 38 Clients use this to set the value of a node. If the @var{path}\n\ 39 39 is not specified (ie. empty string ""), it sets the value for the\n\ 40 40 root node. Otherwise, it sets the value for the element specified\n\ 41 by the path. The @var{value}is treated as the text within the \n\41 by the path. The added data is treated as the text within the \n\ 42 42 tag at the tail of the @var{path}.\n\ 43 43 \n\ 44 44 @var{fileName} is the name of the file to import into the rappture object\n\ 45 @var{ fileType} is an integer representing the type of file to include, text\n\46 (use 0) or binary (use 1).\n\45 @var{compress} is an integer telling if the provided data should be compressed\n\ 46 (use 1) or left uncompressed (use 0).\n\ 47 47 @var{append} is an integer telling if this new data should overwrite\n\ 48 48 (use 0) or be appended (use 1) to previous data in this node.\n\ … … 50 50 Error Codes: err = 0 is success, anything else is failure.") 51 51 { 52 static std::string who = "rpLibPut String";52 static std::string who = "rpLibPutFile"; 53 53 54 54 // The list of values to return. … … 59 59 std::string path = ""; 60 60 std::string fileName = ""; 61 unsigned int fileType= 0;61 unsigned int compress = 0; 62 62 unsigned int append = 0; 63 63 RpLibrary* lib = NULL; 64 64 65 if (nargin == 4) {65 if (nargin == 5) { 66 66 67 67 if ( args(0).is_real_scalar() && … … 69 69 args(2).is_string() && 70 70 args(3).is_real_scalar() && 71 args( 3).is_real_scalar() ) {71 args(4).is_real_scalar() ) { 72 72 73 73 libHandle = args(0).int_value (); 74 74 path = args(1).string_value (); 75 75 fileName = args(2).string_value (); 76 fileType= (unsigned int) args(3).int_value ();77 append = (unsigned int) args( 3).int_value ();76 compress = (unsigned int) args(3).int_value (); 77 append = (unsigned int) args(4).int_value (); 78 78 79 79 /* Call the C subroutine. */ … … 84 84 lib = getObject_Lib(libHandle); 85 85 if (lib) { 86 lib->putFile(path,fileName, fileType,append);86 lib->putFile(path,fileName,compress,append); 87 87 err = 0; 88 88 }
Note: See TracChangeset
for help on using the changeset viewer.