Changeset 1473 for trunk/bindings
- Timestamp:
- 09/05/10 14:28:15 (2 years ago)
- Location:
- trunk/bindings
- Files:
-
- 4 edited
-
cpp/NeXusFile.cpp (modified) (2 diffs)
-
cpp/NeXusFile.hpp (modified) (13 diffs)
-
java/org/nexusformat/NexusFile.java (modified) (2 diffs)
-
python/nxs/napi.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bindings/cpp/NeXusFile.cpp
r1470 r1473 15 15 16 16 /** 17 * \mainpage NeXus C++ API documentation 17 * \mainpage NeXus C++ API 18 * @author Peter Peterson 19 * @author Freddie Akeroyd 18 20 * \section sec_purpose Purpose of API 19 21 * This provides a C++ like interface to the NeXus C API. It adds: … … 30 32 * #include "NeXusFile.hpp" 31 33 * \endcode 34 * 35 * \example napi_test_cpp.cxx 36 * Test program for NeXus C++ Interface 37 * 32 38 * For details of the C API see http://download.nexusformat.org/doxygen/html-c/ 33 39 */ -
trunk/bindings/cpp/NeXusFile.hpp
r1468 r1473 257 257 * Create a 1D data field, insert the data, and close the data. 258 258 * 259 * \tparam NumT numeric data type of \a value 259 260 * \param name The name of the field to create. 260 261 * \param value The vector to put into the file. … … 266 267 * Create a 1D data field, insert the data, and close the data. 267 268 * 269 * \tparam NumT numeric data type of \a value 268 270 * \param name The name of the field to create. 269 271 * \param value The value to put into the file. … … 278 280 * \param value The data to put into the file. 279 281 * \param dims The dimensions of the data. 282 * \tparam NumT numeric data type of \a value 280 283 */ 281 284 template <typename NumT> … … 305 308 * \param comp The compression algorithm to use. 306 309 * \param bufsize The size of the compression buffer to use. 310 * \tparam NumT numeric data type of \a value 307 311 */ 308 312 template <typename NumT> … … 329 333 /** 330 334 * \param data The data to put in the file. 335 * \tparam NumT numeric data type of \a data 331 336 */ 332 337 template <typename NumT> … … 346 351 * \param name Name of the attribute to add. 347 352 * \param value The attribute value. 353 * \tparam NumT numeric data type of \a value 348 354 */ 349 355 template <typename NumT> … … 382 388 * \param start The starting index to insert the data. 383 389 * \param size The size of the array to put in the file. 390 * \tparam NumT numeric data type of \a data 384 391 */ 385 392 template <typename NumT> … … 393 400 * \param start The starting index to insert the data. 394 401 * \param size The size of the array to put in the file. 402 * \tparam NumT numeric data type of \a data 395 403 */ 396 404 template <typename NumT> … … 434 442 * does call "new vector<NumT>" the caller is responsible for 435 443 * calling "delete". 444 * \tparam NumT numeric data type of result 436 445 * 437 446 * \return The data as a vector. … … 446 455 * 447 456 * \param data Where to put the data. 457 * \tparam NumT numeric data type of \a data 448 458 */ 449 459 template <typename NumT> … … 496 506 * 497 507 * \param info Designation of which attribute to read. 508 * \tparam NumT numeric data type of result 498 509 * 499 510 * \return The attribute value. … … 507 518 * 508 519 * \param[in] name Name of attribute to read 509 *510 520 * \param[out] value The read attribute value. 521 * \tparam NumT numeric data type of \a value 511 522 */ 512 523 template <typename NumT> … … 594 605 /** 595 606 * This function returns the NXnumtype given a concrete number. 607 * \tparam NumT numeric data type of \a number to check 596 608 */ 597 609 template <typename NumT> -
trunk/bindings/java/org/nexusformat/NexusFile.java
r1465 r1473 1 1 /** 2 2 * 3 * The NeXus-API for Java. NeXus is an attempt to define a common data 3 * @mainpage The NeXus-API for Java. 4 * NeXus is an attempt to define a common data 4 5 * format for org and x-ray diffraction. NeXus is built on top of the 5 6 * Hierarchical Data Format from NCSA. There exist already API's to … … 10 11 * different calling standards between C and Java. 11 12 * 13 * @example TestJapi.java 14 * Test program for Java API 12 15 * 13 16 * @author Mark Koennecke, October 2000 -
trunk/bindings/python/nxs/napi.py
r1461 r1473 14 14 looks in the following places in order:: 15 15 16 os.environ['NEXUSLIB'] - All 17 directory containing nxs.py - All 18 os.environ['NEXUSDIR']\bin - Windows 19 os.environ['LD_LIBRARY_PATH'] - Unix 20 os.environ['DYLD_LIBRARY_PATH'] - Darwin 21 PREFIX/lib - Unix and Darwin 22 /usr/local/lib - Unix and Darwin 23 /usr/lib - Unix and Darwin 24 25 On Windows it looks for one of libNeXus.dll or libNeXus-0.dll. 26 On OS X it looks for libNeXus.dylib 27 On Unix it looks for libNeXus.so 28 NEXUSDIR defaults to r'C:\Program Files\NeXus Data Format'. 29 PREFIX defaults to /usr/local, but is replaced by the value of 30 --prefix during configure. 16 @verbatim 17 os.environ['NEXUSLIB'] - All 18 directory containing nxs.py - All 19 os.environ['NEXUSDIR']\bin - Windows 20 os.environ['LD_LIBRARY_PATH'] - Unix 21 os.environ['DYLD_LIBRARY_PATH'] - Darwin 22 PREFIX/lib - Unix and Darwin 23 /usr/local/lib - Unix and Darwin 24 /usr/lib - Unix and Darwin 25 @endverbatim 26 27 - On Windows it looks for one of libNeXus.dll or libNeXus-0.dll. 28 - On OS X it looks for libNeXus.dylib 29 - On Unix it looks for libNeXus.so 30 - NEXUSDIR defaults to 'C:\\Program Files\\NeXus Data Format'. 31 - PREFIX defaults to /usr/local, but is replaced by the value of --prefix during configure. 31 32 32 33 The import will raise an OSError exception if the library wasn't found … … 40 41 Example 41 42 ======= 42 43 @code 43 44 import nxs 44 45 file = nxs.open('filename.nxs','rw') … … 47 48 print file.getdata() 48 49 file.close() 49 50 See nxstest.py for a more complete example. 50 @endcode 51 52 See @example nxstest.py for a more complete example. 51 53 52 54 Interface … … 71 73 File open modes can be constants or strings:: 72 74 73 nxs.ACC_READ 'r' 74 nxs.ACC_RDWR 'rw' 75 nxs.ACC_CREATE 'w' 76 nxs.ACC_CREATE4 'w4' 77 nxs.ACC_CREATE5 'w5' 78 nxs.ACC_CREATEXML 'wx' 75 @verbatim 76 nxs.ACC_READ 'r' 77 nxs.ACC_RDWR 'rw' 78 nxs.ACC_CREATE 'w' 79 nxs.ACC_CREATE4 'w4' 80 nxs.ACC_CREATE5 'w5' 81 nxs.ACC_CREATEXML 'wx' 82 @endverbatim 79 83 80 84 Dimension constants:: 81 85 82 nxs.UNLIMITED - for the extensible data dimension83 nxs.MAXRANK - for the number of possible dimensions86 - nxs.UNLIMITED - for the extensible data dimension 87 - nxs.MAXRANK - for the number of possible dimensions 84 88 85 89 Data types are strings corresponding to the numpy data types:: … … 104 108 Miscellaneous constants:: 105 109 106 nxs.MAXNAMELEN - names must be shorter than this107 nxs.MAXPATHLEN - total path length must be shorter than this108 nxs.H4SKIP - class names that may appear in HDF4 files but can be ignored110 - nxs.MAXNAMELEN - names must be shorter than this 111 - nxs.MAXPATHLEN - total path length must be shorter than this 112 - nxs.H4SKIP - class names that may appear in HDF4 files but can be ignored 109 113 110 114 Caveats 111 115 ======= 112 116 113 TODO:NOSTRIP constant is probably not handled properly,114 TODO:Embedded nulls in strings is not supported115 116 WARNING:We have a memory leak. Calling open/close costs about 90k a pair.117 @todo NOSTRIP constant is probably not handled properly, 118 @todo Embedded nulls in strings is not supported 119 120 @warning We have a memory leak. Calling open/close costs about 90k a pair. 117 121 This is an eigenbug: 118 - if I test ctypes on a simple library it does not leak 119 - if I use the leak_test1 code in the nexus distribution it doesn't leak 120 - if I remove the open/close call in the wrapper it doesn't leak. 121 122 .. _NAPI: http://www.nexusformat.org/Application_Program_Interface 122 - if I test ctypes on a simple library it does not leak 123 - if I use the leak_test1 code in the nexus distribution it doesn't leak 124 - if I remove the open/close call in the wrapper it doesn't leak. 125 123 126 """ 127 124 128 __all__ = ['UNLIMITED', 'MAXRANK', 'MAXNAMELEN','MAXPATHLEN','H4SKIP', 125 129 'NeXus','NeXusError','open']
Note: See TracChangeset
for help on using the changeset viewer.
