Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

WinDefAwk Class Reference

Inheritance diagram for WinDefAwk:

Inheritance graph
[legend]
Collaboration diagram for WinDefAwk:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WinDefAwk (const cmt_string &library_name)
void begin ()
void filter (const cmt_string &line)
void end ()

Private Attributes

cmt_string m_name

Constructor & Destructor Documentation

WinDefAwk::WinDefAwk const cmt_string library_name  )  [inline]
 

Definition at line 748 of file cmt_generator.cxx.

References m_name.

00749     {
00750       m_name = library_name;
00751     }


Member Function Documentation

void WinDefAwk::begin  )  [inline, virtual]
 

Reimplemented from Awk.

Definition at line 753 of file cmt_generator.cxx.

References m_name.

00754     {
00755       cout << "LIBRARY " << m_name << endl;
00756       cout << "EXPORTS" << endl;
00757     }

void WinDefAwk::end  )  [inline, virtual]
 

Reimplemented from Awk.

Definition at line 802 of file cmt_generator.cxx.

00803     {
00804     }

void WinDefAwk::filter const cmt_string line  )  [inline, virtual]
 

Reimplemented from Awk.

Definition at line 759 of file cmt_generator.cxx.

References CmtSystem::cmt_string_vector, cmt_string::erase(), cmt_string::find(), cmt_string::replace_all(), cmt_vector< T >::size(), and CmtSystem::split().

00760     {
00761       if (line.find ("External") == cmt_string::npos) return;
00762       if (line.find ("??_") != cmt_string::npos)
00763         {
00764           if (line.find ("operator/=") == cmt_string::npos) return;
00765           // Keep operator /= .
00766         }
00767 
00768       CmtSystem::cmt_string_vector words;
00769       CmtSystem::split (line, " \t", words);
00770       if (words.size () >= 8)
00771         {
00772           int pos = 7;
00773 
00774           cmt_string& fifth_word = words[4];
00775           if (fifth_word == "()") pos = 7;
00776           else if (fifth_word == "External") pos = 6;
00777           else return;
00778 
00779           cmt_string& symbol = words[pos];
00780           if (symbol[0] == '_') symbol.erase (0, 1);
00781           symbol.replace_all ("\r", "");
00782           symbol.replace_all ("\n", "");
00783 
00784           if ((pos == 6) && (line.find("static class") != cmt_string::npos))
00785             {
00786               // static class objects are not DATA :
00787               cout << " " << symbol << " " << endl;
00788             } 
00789           else if (pos == 6)
00790             {
00791               // DATA :
00792               cout << " " << symbol << "\tDATA" << endl;
00793             } 
00794           else
00795             {
00796               // code :
00797               cout << " " << symbol << " " << endl;
00798             } 
00799         }
00800     }


Member Data Documentation

cmt_string WinDefAwk::m_name [private]
 

Definition at line 807 of file cmt_generator.cxx.

Referenced by begin(), and WinDefAwk().


The documentation for this class was generated from the following file:
Generated on Mon May 2 10:26:06 2005 for CMT by doxygen 1.3.5