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

fragment_action_iterator Class Reference

Collaboration diagram for fragment_action_iterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 fragment_action_iterator (Use *use)
void add_word (const cmt_string &w)
void commit ()

Private Types

enum  { need_name, need_options }

Private Attributes

enum fragment_action_iterator:: { ... }  m_state
cmt_string m_name
cmt_string m_suffix
cmt_string m_header
cmt_string m_trailer
bool m_need_dependencies
Usem_use

Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
need_name 
need_options 

Definition at line 222 of file cmt_fragment.cxx.

00223     {
00224       need_name,
00225       need_options
00226     } m_state;


Constructor & Destructor Documentation

fragment_action_iterator::fragment_action_iterator Use use  )  [inline]
 

Definition at line 166 of file cmt_fragment.cxx.

References m_need_dependencies, m_state, m_use, and need_name.

00166                                       :
00167     m_need_dependencies (false),
00168     m_state (need_name),
00169     m_use (use)
00170   {
00171   }


Member Function Documentation

void fragment_action_iterator::add_word const cmt_string w  )  [inline]
 

Definition at line 173 of file cmt_fragment.cxx.

References Fragment::add(), Fragment::find(), m_header, m_name, m_need_dependencies, m_state, m_suffix, m_trailer, m_use, need_name, need_options, and cmt_string::replace().

Referenced by Fragment::action().

00174   {
00175     switch (m_state)
00176       {
00177       case need_name:
00178         m_name = w;
00179         m_state = need_options;
00180         break;
00181       case need_options:
00182         if (w.find ("-suffix=") != cmt_string::npos)
00183           {
00184             m_suffix = w;
00185             m_suffix.replace ("-suffix=", "");
00186           }
00187         else if (w.find ("-dependencies") != cmt_string::npos)
00188           {
00189             m_need_dependencies = true;
00190           }
00191         else if (w.find ("-header=") != cmt_string::npos)
00192           {
00193             m_header = w;
00194             m_header.replace ("-header=", "");
00195 
00196             if (Fragment::find (m_header) == 0)
00197               {
00198                 Fragment::add (m_header, "", "", "", false, m_use);
00199               }
00200           }
00201         else if (w.find ("-trailer=") != cmt_string::npos)
00202           {
00203             m_trailer = w;
00204             m_trailer.replace ("-trailer=", "");
00205             
00206             if (Fragment::find (m_trailer) == 0)
00207               {
00208                 Fragment::add (m_trailer, "", "", "", false, m_use);
00209               }
00210           }
00211         break;
00212       }
00213   }

void fragment_action_iterator::commit  )  [inline]
 

Definition at line 215 of file cmt_fragment.cxx.

References Fragment::add(), m_header, m_name, m_need_dependencies, m_suffix, m_trailer, and m_use.

Referenced by Fragment::action().

00216   {
00217     Fragment::add (m_name, m_suffix, m_header, m_trailer, m_need_dependencies, m_use);
00218   }


Member Data Documentation

cmt_string fragment_action_iterator::m_header [private]
 

Definition at line 230 of file cmt_fragment.cxx.

Referenced by add_word(), and commit().

cmt_string fragment_action_iterator::m_name [private]
 

Definition at line 228 of file cmt_fragment.cxx.

Referenced by add_word(), and commit().

bool fragment_action_iterator::m_need_dependencies [private]
 

Definition at line 232 of file cmt_fragment.cxx.

Referenced by add_word(), commit(), and fragment_action_iterator().

enum { ... } fragment_action_iterator::m_state [private]
 

Referenced by add_word(), and fragment_action_iterator().

cmt_string fragment_action_iterator::m_suffix [private]
 

Definition at line 229 of file cmt_fragment.cxx.

Referenced by add_word(), and commit().

cmt_string fragment_action_iterator::m_trailer [private]
 

Definition at line 231 of file cmt_fragment.cxx.

Referenced by add_word(), and commit().

Use* fragment_action_iterator::m_use [private]
 

Definition at line 233 of file cmt_fragment.cxx.

Referenced by add_word(), commit(), and fragment_action_iterator().


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