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

IgnorePattern Class Reference

#include <cmt_pattern.h>

Collaboration diagram for IgnorePattern:

[legend]
List of all members.

Public Types

typedef cmt_vector< IgnorePattern >? IgnorePatternVector

Public Methods

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

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)

Public Attributes

cmt_string? name
Use *? use

Member Typedef Documentation

typedef cmt_vector IgnorePattern::IgnorePatternVector
?

Definition at line 135 of file cmt_pattern.h.


Constructor & Destructor Documentation

IgnorePattern::IgnorePattern (? ? )?
?

Definition at line 1143 of file cmt_pattern.cxx.

01144 {
01145 }

IgnorePattern::~IgnorePattern (? ? )?
?

Definition at line 1148 of file cmt_pattern.cxx.

01149 {
01150 }

Member Function Documentation

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

Definition at line 1085 of file cmt_pattern.cxx.

References add(), Use::current(), name, and cmt_vector< cmt_string >::size().

Referenced by KwdIgnorePattern::action().

01086 {
01087     //
01088     // Expected syntax is
01089     //
01090     // ignore_pattern 
01091     //
01092 
01093   if (words.size () < 2) return;
01094 
01095   if (use == 0) use = &(Use::current());
01096 
01097   cmt_string& name = words[1];
01098 
01099   add (name, use);
01100 }

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

Definition at line 1127 of file cmt_pattern.cxx.

References cmt_vector< IgnorePattern >::add(), find(), Use::ignore_patterns, name, and use.

Referenced by action().

01128 {
01129   IgnorePattern* ignore_pattern;
01130 
01131   ignore_pattern = find (name, use);
01132 
01133   if (ignore_pattern == 0)
01134     {
01135       IgnorePattern& a = use->ignore_patterns.add ();
01136 
01137       a.name = name;
01138       a.use  = use;
01139     }
01140 }

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

Definition at line 1103 of file cmt_pattern.cxx.

References Use::current(), Use::ignore_patterns, name, and cmt_vector< IgnorePattern >::size().

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

01104 {
01105   int ignore_pattern_index;
01106 
01107   if (use == 0) use = &(Use::current());
01108 
01109   if (use->ignore_patterns.size () == 0) return (0);
01110 
01111   for (ignore_pattern_index = 0;
01112        ignore_pattern_index < use->ignore_patterns.size ();
01113        ignore_pattern_index++)
01114     {
01115       IgnorePattern& ignore_pattern = use->ignore_patterns[ignore_pattern_index];
01116 
01117       if (ignore_pattern.name == name)
01118         {
01119           return (&ignore_pattern);
01120         }
01121     }
01122 
01123   return (0);
01124 }

void IgnorePattern::show (? ? )?
?

Definition at line 1153 of file cmt_pattern.cxx.

01154 {
01155 }

Member Data Documentation

cmt_string IgnorePattern::name
?

Definition at line 148 of file cmt_pattern.h.

Referenced by action(), add(), and find().

Use* IgnorePattern::use
?

Definition at line 149 of file cmt_pattern.h.

Referenced by add().


The documentation for this class was generated from the following files:
Generated on Wed Sep 1 11:00:23 2004 for CMT by 1.2.18