Changeset 1089 for trunk/lang/perl/Rappture.xs
- Timestamp:
- Aug 3, 2008 11:49:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lang/perl/Rappture.xs
r872 r1089 10 10 using namespace std; 11 11 12 MODULE = Rappture 12 MODULE = Rappture PACKAGE = Rappture::RpLibrary 13 13 PROTOTYPES: ENABLE 14 14 … … 16 16 RpLibrary::new(filename = "") 17 17 char *filename 18 18 CODE: 19 19 RpLibrary *library; 20 21 22 23 20 if ((filename == NULL) || (*filename == '\0')) 21 library = new RpLibrary(); 22 else 23 library = new RpLibrary(filename); 24 24 25 25 if (library->isNull()) 26 26 { 27 27 delete library; 28 28 XSRETURN_UNDEF; 29 29 } 30 31 32 33 30 else 31 RETVAL = library; 32 OUTPUT: 33 RETVAL 34 34 35 35 void * 36 36 RpLibrary::DESTROY() 37 38 37 CODE: 38 RETVAL = 0; 39 39 40 40 const char * 41 41 RpLibrary::get( path ) 42 42 char *path 43 44 45 46 47 48 43 CODE: 44 string result; 45 result = THIS->get(path); 46 RETVAL = result.c_str(); 47 OUTPUT: 48 RETVAL 49 49 50 50 void … … 53 53 char *value 54 54 int append 55 56 55 CODE: 56 THIS->put(path,value,"",append); 57 57 58 58 void … … 62 62 int compress 63 63 int append 64 65 64 CODE: 65 THIS->putFile(path,fileName,compress,append); 66 66 67 67 void 68 68 RpLibrary::result() 69 70 71 69 CODE: 70 THIS->put("tool.version.rappture.language", "perl"); 71 THIS->result(); 72 72 73 MODULE = Rappture 73 MODULE = Rappture PACKAGE = Rappture::RpUnits 74 74 75 75 const char * … … 78 78 const char *toUnitsName 79 79 int showUnits 80 81 82 80 CODE: 81 string result; 82 result = RpUnits::convert(fromVal,toUnitsName,showUnits); 83 83 84 84 if (result.empty()) 85 85 XSRETURN_UNDEF; 86 86 87 88 89 87 RETVAL = result.c_str(); 88 OUTPUT: 89 RETVAL 90 90 91 MODULE = Rappture 91 MODULE = Rappture PACKAGE = Rappture::Utils 92 92 93 93 int … … 95 95 int percent 96 96 const char *message 97 98 99 100 97 CODE: 98 RETVAL = Rappture::Utils::progress(percent,message); 99 OUTPUT: 100 RETVAL
Note: See TracChangeset
for help on using the changeset viewer.