Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

IgnorePattern Class Reference

#include <cmt_pattern.h>

Collaboration diagram for IgnorePattern:

Collaboration graph
[legend]
List of all members.

Public Types

typedef cmt_vector<IgnorePattern> IgnorePatternVector

Public Methods

 IgnorePattern ()
 ~IgnorePattern ()
void show () const

Public Attributes

cmt_string name
Useuse

Static Public Methods

void action (const CmtSystem::cmt_string_vector& words, Use* use)
IgnorePattern* find (const cmt_string& name, Use* use)
void add (const cmt_string& name, Use* use)

Member Typedef Documentation

typedef cmt_vector<IgnorePattern> IgnorePattern::IgnorePatternVector
 

Definition at line 89 of file cmt_pattern.h.


Constructor & Destructor Documentation

IgnorePattern::IgnorePattern ( )
 

Definition at line 714 of file cmt_pattern.cxx.

00715 {
00716 }

IgnorePattern::~IgnorePattern ( )
 

Definition at line 719 of file cmt_pattern.cxx.

00720 {
00721 }


Member Function Documentation

void IgnorePattern::action ( const CmtSystem::cmt_string_vector & words,
Use * use ) [static]
 

Definition at line 656 of file cmt_pattern.cxx.

Referenced by Cmt::select().

00657 {
00658     //
00659     // Expected syntax is
00660     //
00661     // ignore_pattern <pattern-name>
00662     //
00663 
00664   if (words.size () < 2) return;
00665 
00666   if (use == 0) use = &(Use::current());
00667 
00668   cmt_string& name = words[1];
00669 
00670   add (name, use);
00671 }

void IgnorePattern::add ( const cmt_string & name,
Use * use ) [static]
 

Definition at line 698 of file cmt_pattern.cxx.

Referenced by action().

00699 {
00700   IgnorePattern* ignore_pattern;
00701 
00702   ignore_pattern = find (name, use);
00703 
00704   if (ignore_pattern == 0)
00705     {
00706       IgnorePattern& a = use->ignore_patterns.add ();
00707 
00708       a.name = name;
00709       a.use  = use;
00710     }
00711 }

IgnorePattern * IgnorePattern::find ( const cmt_string & name,
Use * use ) [static]
 

Definition at line 674 of file cmt_pattern.cxx.

Referenced by add(), Pattern::apply(), and Pattern::apply_all_globals().

00675 {
00676   int ignore_pattern_index;
00677 
00678   if (use == 0) use = &(Use::current());
00679 
00680   if (use->ignore_patterns.size () == 0) return (0);
00681 
00682   for (ignore_pattern_index = 0;
00683        ignore_pattern_index < use->ignore_patterns.size ();
00684        ignore_pattern_index++)
00685     {
00686       IgnorePattern& ignore_pattern = use->ignore_patterns[ignore_pattern_index];
00687 
00688       if (ignore_pattern.name == name)
00689         {
00690           return (&ignore_pattern);
00691         }
00692     }
00693 
00694   return (0);
00695 }

void IgnorePattern::show ( ) const
 

Definition at line 724 of file cmt_pattern.cxx.

00725 {
00726 }


Member Data Documentation

cmt_string IgnorePattern::name
 

Definition at line 102 of file cmt_pattern.h.

Use * IgnorePattern::use
 

Definition at line 103 of file cmt_pattern.h.


The documentation for this class was generated from the following files:
Generated at Thu May 16 16:27:51 2002 for CMT by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000