· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Emacs Expand Member Functions

Çì´õÆÄÀÏÀÇ Å¬·¡½º ¸â¹öÇÔ¼ö ¼Ò½ºÆÄÀÏ¿¡ ÆíÇÏ°Ô Ãß°¡Çϱâ


1. ´Ù¿î·Îµå


[http]¿©±â°¡ ¿ø·¡ ÆäÀÌÁö À̳ª ÆäÀÌÁö ³»ºÎ¿¡ ÀÖ´Â °ü·Ã ¸µÅ©°¡ ±úÁ® ÀÖ½À´Ï´Ù.
±×·¡¼­ [http]¿©±â¿¡¼­ ExpandMemberFunctions ±â´ÉÀ» ÇÏ´Â ÆÄÀϸ¸ ÃßÃâÇß½À´Ï´Ù.

2. ¼³Ä¡¹æ¹ý

À§ ÆÄÀÏ ´Ù¿î·ÎµåÈÄ Àû´çÇÑ °÷¿¡ ¾ÐÃàÇØÁ¦ ÈÄ .emacs ¼³Á¤ÆÄÀÏ¿¡ ¾Æ·¡ ³»¿ë Ãß°¡
(add-to-list 'load-path "/¼³Ä¡ÇÑ°÷/expand-member-functions")
(autoload 'expand-member-functions "member-functions" "Expand C++ member function declarations" t)
(add-hook 'c++-mode-hook (lambda () (local-set-key "\C-cm" 'expand-member-functions)))

3. °£´ÜÇÑ »ç¿ë¹ý

°£´ÜÇÑ Äڵ带 ÀÔ·ÂÈÄ (test.h ¶ó °¡Á¤)
class Test
{
public:
    void PrintTest1();
    void PrintTest2();
};
M-x expand-member-functions
or C-c m (À§ ¼³Ä¡ ¹æ¹ý´ë·Î Çß°í c++-mode ÀÏ °æ¿ì)
(Çì´õÆÄÀÏ È®ÀåÀÚ°¡ h Àΰæ¿ì c-mode ÀÎ °æ¿ì°¡ ÀÖ½À´Ï´Ù.)

¹Ì´Ï¹öÆÛ¿¡ ¾Æ·¡ ³ª¿À¸é ¿£ÅÍ
Header file: test.h

¹Ì´Ï¹öÆÛ¿¡ ¾Æ·¡ ³ª¿À¸é Àû´çÈ÷ ÀÔ·ÂÈÄ ¿£ÅÍ
Implementation file: test.cc

±×·±ÈÄ ¹öÆÛ¸¦ ã¾Æº¸½Ã¸é ¾Æ·¡Ã³·³ test.cc °¡ ¸¸µé¾îÁ® ÀÖÀ» °ÍÀÔ´Ï´Ù. ²À C-x C-s Çϼż­ ÀúÀåÇϽñ⠹ٶø´Ï´Ù.
void Test::PrintTest1() {

}

void Test::PrintTest2() {

}

4. Âü°í

namespace¸¦ ¾µ °æ¿ì Àß ÀÛµ¿ÀÌ ¾ÈµË´Ï´Ù.

5. ¾à°£ ¼öÁ¤µÈ ¹öÀü


»ý¼ºµÇ´Â ÄÚµå ½ºÅ¸ÀÏÀ» ¾Æ·¡¿¡¼­
void Test::PrintTest1() {

}

void Test::PrintTest2() {

}

ÀÌ·¸°Ô
void Test::PrintTest1()
{

}

void Test::PrintTest2()
{

}
¹Ù²Ù°í È®ÀåÀÚ "h"¿Ü¿¡ hh,hpp,hxxµµ ÀνÄÇÏ°Ô ¸¸µê


(!) primewizard - 20080809

ID
Password
Join
You will gain money by a speculation or lottery.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-08-15 15:36:05
Processing time 0.0047 sec