Changeset 1473
- Timestamp:
- 09/05/10 14:28:15 (21 months ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
bindings/cpp/NeXusFile.cpp (modified) (2 diffs)
-
bindings/cpp/NeXusFile.hpp (modified) (13 diffs)
-
bindings/java/org/nexusformat/NexusFile.java (modified) (2 diffs)
-
bindings/python/nxs/napi.py (modified) (5 diffs)
-
doc/doxygen/Doxyfile_c (modified) (1 diff)
-
doc/doxygen/Doxyfile_cpp (modified) (3 diffs)
-
doc/doxygen/Doxyfile_java (modified) (2 diffs)
-
doc/doxygen/Doxyfile_python (modified) (2 diffs)
-
doc/doxygen/Makefile.am (modified) (1 diff)
-
include/napi.h (modified) (1 diff)
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'] -
trunk/doc/doxygen/Doxyfile_c
r1426 r1473 1311 1311 # a tag file that is based on the input files it reads. 1312 1312 1313 GENERATE_TAGFILE = 1313 GENERATE_TAGFILE = c-api.tag 1314 1314 1315 1315 # If the ALLEXTERNALS tag is set to YES all external classes will be listed -
trunk/doc/doxygen/Doxyfile_cpp
r1426 r1473 635 635 # the \include command). 636 636 637 EXAMPLE_PATH = 637 EXAMPLE_PATH = $(TOPSRC)/test 638 638 639 639 # If the value of the EXAMPLE_PATH tag contains directories, you can use the … … 642 642 # blank all files are included. 643 643 644 EXAMPLE_PATTERNS = 644 EXAMPLE_PATTERNS = *.cpp *.cxx 645 645 646 646 # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be … … 1313 1313 # is run, you must also specify the path to the tagfile here. 1314 1314 1315 TAGFILES = 1315 TAGFILES = c-api.tag=../html-c 1316 1316 1317 1317 # When a file name is specified after GENERATE_TAGFILE, doxygen will create -
trunk/doc/doxygen/Doxyfile_java
r1426 r1473 636 636 # the \include command). 637 637 638 EXAMPLE_PATH = 638 EXAMPLE_PATH = $(TOPSRC)/bindings/java/test 639 639 640 640 # If the value of the EXAMPLE_PATH tag contains directories, you can use the … … 643 643 # blank all files are included. 644 644 645 EXAMPLE_PATTERNS = 645 EXAMPLE_PATTERNS = *.java 646 646 647 647 # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -
trunk/doc/doxygen/Doxyfile_python
r1464 r1473 626 626 # the \include command). 627 627 628 EXAMPLE_PATH = 628 EXAMPLE_PATH = $(TOPSRC)/bindings/python 629 629 630 630 # If the value of the EXAMPLE_PATH tag contains directories, you can use the … … 633 633 # blank all files are included. 634 634 635 EXAMPLE_PATTERNS = 635 EXAMPLE_PATTERNS = *.py 636 636 637 637 # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -
trunk/doc/doxygen/Makefile.am
r1445 r1473 7 7 # documenttion subdirectories 8 8 nxdoxydir = $(NXDOCDIR)/doxygen 9 CLEANFILES = doxy.remove_me_to_remake 9 CLEANFILES = doxy.remove_me_to_remake c-api.tag 10 10 11 11 all : doxy.remove_me_to_remake -
trunk/include/napi.h
r1460 r1473 119 119 120 120 121 /** \var NeXus data types121 /** 122 122 * \ingroup c_types 123 * \li NX_FLOAT32 32 bit float 124 * \li NX_FLOAT64 64 nit float == double 125 * \li NX_INT8 8 bit integer == byte 126 * \li NX_UINT8 8 bit unsigned integer 127 * \li NX_INT16 16 bit integer 128 * \li NX_UINT16 16 bit unsigned integer 129 * \li NX_INT32 32 bit integer 130 * \li NX_UINT32 32 bit unsigned integer 131 * \li NX_CHAR 8 bit character 132 * \li NX_BINARY lump of binary data == NX_UINT8 123 * \def NX_FLOAT32 124 * 32 bit float 125 * \def NX_FLOAT64 126 * 64 bit float == double 127 * \def NX_INT8 128 * 8 bit integer == byte 129 * \def NX_UINT8 130 * 8 bit unsigned integer 131 * \def NX_INT16 132 * 16 bit integer 133 * \def NX_UINT16 134 * 16 bit unsigned integer 135 * \def NX_INT32 136 * 32 bit integer 137 * \def NX_UINT32 138 * 32 bit unsigned integer 139 * \def NX_CHAR 140 * 8 bit character 141 * \def NX_BINARY 142 * lump of binary data == NX_UINT8 133 143 */ 134 144 /*--------------------------------------------------------------------------*/
Note: See TracChangeset
for help on using the changeset viewer.
