KiCad PCB EDA Suite
SCH_FIND_REPLACE_DATA Class Reference

Class SCH_FIND_REPLACE_DATA adds missing useful comparison and assignment operators to the wxFindReplaceData object. More...

#include <dialog_schematic_find.h>

Inheritance diagram for SCH_FIND_REPLACE_DATA:

Public Member Functions

SCH_FIND_REPLACE_DATAoperator= (SCH_FIND_REPLACE_DATA &aFindReplaceData)
 
bool operator== (SCH_FIND_REPLACE_DATA &aFindReplaceData)
 
bool operator!= (SCH_FIND_REPLACE_DATA &aFindReplaceData)
 
bool ChangesCompare (const SCH_FIND_REPLACE_DATA &aFindReplaceData)
 Function ChangesCompare tests aFindReplaceData to see if it would result in a change in the search string comparison results. More...
 
bool IsReplacing () const
 
bool IsWrapping () const
 

Private Member Functions

wxUint32 GetCompareFlags () const
 Function GetSearchFlags. More...
 

Detailed Description

Class SCH_FIND_REPLACE_DATA adds missing useful comparison and assignment operators to the wxFindReplaceData object.

Definition at line 95 of file dialog_schematic_find.h.

Member Function Documentation

bool SCH_FIND_REPLACE_DATA::ChangesCompare ( const SCH_FIND_REPLACE_DATA aFindReplaceData)
inline

Function ChangesCompare tests aFindReplaceData to see if it would result in a change in the search string comparison results.

Parameters
aFindReplaceDataA reference to a SCH_FIND_REPLACE_DATA object to compare against.
Returns
True if aFindReplaceData would result in a search and/or replace change, otherwise false.

Definition at line 134 of file dialog_schematic_find.h.

References GetCompareFlags().

Referenced by SCH_FIND_COLLECTOR::IsSearchRequired().

135  {
136  return ( (GetFindString() != aFindReplaceData.GetFindString())
137  || (GetCompareFlags() != aFindReplaceData.GetCompareFlags()) );
138  }
wxUint32 GetCompareFlags() const
Function GetSearchFlags.
wxUint32 SCH_FIND_REPLACE_DATA::GetCompareFlags ( ) const
inlineprivate

Function GetSearchFlags.

Returns
The flags that only effect the search result.

Definition at line 148 of file dialog_schematic_find.h.

References FR_MASK_NON_COMPARE_FLAGS.

Referenced by ChangesCompare().

148 { return GetFlags() & FR_MASK_NON_COMPARE_FLAGS; }
#define FR_MASK_NON_COMPARE_FLAGS
Definition FR_MASK_NON_COMPARE_FLAGS is used to mask find/replace flag bits that do not effect the se...
bool SCH_FIND_REPLACE_DATA::IsReplacing ( ) const
inline

Definition at line 140 of file dialog_schematic_find.h.

References FR_SEARCH_REPLACE.

140 { return (GetFlags() & FR_SEARCH_REPLACE) != 0; }
Perform a search for a item that has replaceable text.
bool SCH_FIND_REPLACE_DATA::IsWrapping ( ) const
inline

Definition at line 141 of file dialog_schematic_find.h.

References FR_SEARCH_WRAP.

Referenced by SCH_FIND_COLLECTOR::IsSearchRequired().

141 { return (GetFlags() & FR_SEARCH_WRAP) != 0; }
Wrap around the beginning or end of search list.
bool SCH_FIND_REPLACE_DATA::operator!= ( SCH_FIND_REPLACE_DATA aFindReplaceData)
inline

Definition at line 118 of file dialog_schematic_find.h.

119  {
120  return !( *this == aFindReplaceData );
121  }
SCH_FIND_REPLACE_DATA& SCH_FIND_REPLACE_DATA::operator= ( SCH_FIND_REPLACE_DATA aFindReplaceData)
inline

Definition at line 99 of file dialog_schematic_find.h.

100  {
101  if( this == &aFindReplaceData )
102  return *this;
103 
104  SetFlags( aFindReplaceData.GetFlags() );
105  SetFindString( aFindReplaceData.GetFindString() );
106  SetReplaceString( aFindReplaceData.GetReplaceString() );
107 
108  return *this;
109  }
bool SCH_FIND_REPLACE_DATA::operator== ( SCH_FIND_REPLACE_DATA aFindReplaceData)
inline

Definition at line 111 of file dialog_schematic_find.h.

112  {
113  return ( (GetFlags() == aFindReplaceData.GetFlags())
114  && (GetFindString() == aFindReplaceData.GetFindString())
115  && (GetReplaceString() == aFindReplaceData.GetReplaceString()) );
116  }

The documentation for this class was generated from the following file: