README (3643B)
- from D to C++
- If you are more familiar English than Japanese, please read README.en.
- ¡¦ÀâÌÀ¡£
- C++ ¤Î°ä»º(»à¤ó¤Ç¤Ê¤¤) ¤ò D ¤«¤é¿¨¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¹¡£
- extern(C++) ¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤¿»þ¡¢Ìµ°ÕÌ£¤Ëµ¢¤ê¤Þ¤¹¡£
- C++ ¤«¤é¤Ï C ¤Î¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤òÄ󶡤·¤Æ¡¢
- D ¤«¤é¤½¤ì¤ò¿¨¤ë¤¿¤á¤Î¥¤¥ó¥Ý¡¼¥È¥é¥¤¥Ö¥é¥ê¤âºî¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡¢
- ¤È¤¤¤¦¤³¤È¤òÍý²ò¤·¤Æ失¤ì¤Ð²¿¤¬¤ä¤ê¤¿¤¤¤«¤¬¤ï¤«¤ë¤«¤È»×¤¤¤Þ¤¹¡£
- C ´Ø¿ô¤ÎÀë¸À/ÄêµÁ¤Ï C++ ¥½¡¼¥¹¤«¤é¥×¥ê¥×¥í¥»¥Ã¥µ¤Ç¡¢
- D ´Ø¿ô¤ÎÀë¸À¤Ï C++ ¥½¡¼¥¹¤«¤é perl ¥¹¥¯¥ê¥×¥È¤ÇÀ¸À®¤µ¤ì¤Þ¤¹¡£
- README.en ¤ÇÀâÌÀ¤òÊü´þ¤¹¤ë¤¿¤á¤Ëºî¤Ã¤¿¿Þ¡£
- generating process
- C++ using d_cpp -----------------------> C wrapper
- (interface definition) | preprocesser
- |
- --------------------> D import interface
- perl script
- accessing process
- D client code --> D import interface --> C wrapper -->
- C++ using d_cpp --> C++ library code
- ¡¦¥Õ¥¡¥¤¥ë¤ÎÀâÌÀ
- README:
- ¤³¤ì¡£
- Makefile:
- ¥µ¥ó¥×¥ë¤Ç¤¢¤ë¤È¤³¤í¤Î cpp_test ¼Â¹Ô¥Õ¥¡¥¤¥ë¤òºî¤ë¡£
- Makefile.win32:
- windows ¤Ç¤Î Makefile¡£
- d_cpp_interface.h:
- C++ ¤«¤é C ¤ÎÀë¸À¤òÀ¸À®¤¹¤ë¤¿¤á¤Î¥Ø¥Ã¥À¡£
- create_d_import.pl:
- D ¤ÎÀë¸À¤ò¼«Æ°À¸À®¤¹¤ë perl ¥¹¥¯¥ê¥×¥È¡£
- cpp.cc:
- ¥µ¥ó¥×¥ë¡¢¥æ¡¼¥¶¤¬½ñ¤«¤Ë¤ã¤Ê¤é¤ó¤Î¤Ï¤³¤ÎÉôʬ¤Ç¤¹¡£
- cpp_test.d:
- D ¤«¤é cpp.cc ¤ò¼ÂºÝ¤Ë¤¤¤¸¤Ã¤Æ¤ß¤ë¥µ¥ó¥×¥ë¡£
- create_d_cpp_interface.pl:
- ¤ª¤Þ¤±¡£d_cpp_interface.h ¤òÀ¸À®¤¹¤ë¡£²þ¤¤·¤¿¤¤¾ì¹ç¤Ë¤É¤¦¤¾¡£
- cpp.cc ¤ÎÁ°È¾¤¬ D ¤«¤é»È¤¤¤¿¤¤¥¯¥é¥¹¥é¥¤¥Ö¥é¥ê¡¢
- ¸åȾÉô¤¬ D ¤Ç import ¤¹¤ë¤Î¤ËɬÍפʺî¶È¤Ç¤¹¡£
- cpp.cc ¤Ë C ´Ø¿ô¤ÎÄêµÁ¤¬¥Þ¥¯¥í¤ÇÀ¸À®¤µ¤ì¤Þ¤¹¡£
- ¤³¤Î¥Þ¥¯¥í¤Ï»¨¤Ê perl script ¤Ç¥Ñ¡¼¥¹¤¹¤ë¤¿¤á¡¢
- ÅÓÃæ¤ÇÀäÂвþ¹Ô¤·¤Ê¤¤¤Ç²¼¤µ¤¤¡£
- D ¤Ë¤è¤ë import ¤Ï create_d_import.pl ¤òÍѤ¤¤Æ
- import ¤¹¤ë¤¿¤á¤Î¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Æ²¼¤µ¤¤¡£
- ¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤ÏÀë¸À¤·¤«´Þ¤Þ¤ì¤Ê¤¤¤Î¤Ç¡¢
- ¥³¥ó¥Ñ¥¤¥ë¡¦¥ê¥ó¥¯¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£
- ¤³¤ó¤Ê¤ä¤ä¤³¤·¤¤¤â¤Î¤ÎÀâÌÀ¤ò½ñ¤¯¼«¿®¤¬Ìµ¤¤¤Î¤Ç¡¢
- cpp.cc ¤òį¤á¤ÆŬÅö¤ËÍý²ò¤·¤Æ²¼¤µ¤¤¡£
- ¡¦¤½¤Î¾
- ¤È¤Æ¤â¤È¤Æ¤â¦ÁÈǤǤ¹¡£¤´°Õ¸«Äº¤±¤ë¤È¤È¤Æ¤â´ò¤·¤¤¤Ç¤¹¡£
- °Ê²¼¤¬¼ÂºÝŪ¤Ê¼ÂÎã¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
- http://user.ecc.u-tokyo.ac.jp/~s31552/wp/bulletss/
- ½¤Àµ BSD ¥é¥¤¥»¥ó¥¹¤Ë½¾¤Ã¤ÆÇÛÉÛ¤·¤Þ¤¹¡£
- Copyright (c) 2003, shinichiro.h All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * The name of the author may not be used to endorse or promote
- products derived from this software without specific prior
- written permission.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- ------------------
- shinichiro.h
- s31552@mail.ecc.u-tokyo.ac.jp
- http://user.ecc.u-tokyo.ac.jp/~s31552/wp/