}
/**
- * @brief Return option value.
- * @return Value as Variant type.
- */
-const varprop::VariantValue& COption::Get() const
-{
- return m_value;
-}
-
-/**
- * @brief Return option default value.
- * @return Default value as varian type.
- */
-const varprop::VariantValue& COption::GetDefault() const
-{
- return m_valueDef;
-}
-
-/**
* @brief Convert string to integer.
* @param [in] str String to convert.
* @param [out] val Converted integer.
varprop::VariantValue m_valueDef; /**< Option's default value. */
};
+/**
+ * @brief Return option value.
+ * @return Value as Variant type.
+ */
+inline const varprop::VariantValue& COption::Get() const
+{
+ return m_value;
+}
+
+/**
+ * @brief Return option default value.
+ * @return Default value as varian type.
+ */
+inline const varprop::VariantValue& COption::GetDefault() const
+{
+ return m_valueDef;
+}
+
typedef std::map<String, COption> OptionsMap;
/**
}
/**
- * @brief Did the user cancel the operation?
- * @return true if the operation was canceled by the user.
- */
-bool ShellFileOperations::IsCanceled() const
-{
- return m_isCanceled;
-}
-
-/**
* @brief Reset the class.
*/
void ShellFileOperations::Reset()
bool m_bOneToOneMapping; /**< Same amount of sources and destinations? */
bool m_isCanceled; /**< Did user cancel the operation? */
};
+
+/**
+ * @brief Did the user cancel the operation?
+ * @return true if the operation was canceled by the user.
+ */
+inline bool ShellFileOperations::IsCanceled() const
+{
+ return m_isCanceled;
+}
+
ClearError();
}
-/**
- * @brief Check if there is error.
- * @return true if there is an error.
- */
-bool UniFile::UniError::HasError() const
-{
- return !desc.empty();
-}
-
-/**
- * @brief Clears the existing error.
- */
-void UniFile::UniError::ClearError()
-{
- desc.erase();
-}
-
-/**
- * @brief Get the error string.
- * @return Error string.
- */
-String UniFile::UniError::GetError() const
-{
- return desc;
-}
-
/////////////
// UniLocalFile
/////////////
}
}
-/** @brief Is it currently attached to a file ? */
-bool UniMemFile::IsOpen() const
-{
- // We don't test the handle here, because we allow "opening" empty file
- // but memory-mapping doesn't work on that, so that uses a special state
- // of no handle, but linenumber of 0
- return m_lineno >= 0;
-}
-
/** @brief Get file status into member variables */
bool UniMemFile::GetFileStatus()
{
}
/**
- * @brief Returns if file has a BOM bytes.
- * @return true if file has BOM bytes, false otherwise.
- */
-bool UniMemFile::HasBom() const
-{
- return m_bom;
-}
-
-/**
- * @brief Sets if file has BOM or not.
- * @param [in] true to have a BOM in file, false to not to have.
- */
-void UniMemFile::SetBom(bool bom)
-{
- m_bom = bom;
-}
-
-/**
* @brief Read one (DOS or UNIX or Mac) line. Do not include eol chars.
* @param [out] line Line read.
* @param [out] lossy `true` if there were lossy encoding.
m_txtstats.clear();
}
-/** @brief Is it currently attached to a file ? */
-bool UniStdioFile::IsOpen() const
-{
- return m_fp != 0;
-}
-
/** @brief Get file status into member variables */
bool UniStdioFile::GetFileStatus()
{
return unicode;
}
-/**
- * @brief Returns if file has a BOM bytes.
- * @return true if file has BOM bytes, false otherwise.
- */
-bool UniStdioFile::HasBom() const
-{
- return m_bom;
-}
-
-/**
- * @brief Sets if file has BOM or not.
- * @param [in] true to have a BOM in file, false to not to have.
- */
-void UniStdioFile::SetBom(bool bom)
-{
- m_bom = bom;
-}
-
-
bool UniStdioFile::ReadString(String & line, bool * lossy)
{
assert(false); // unimplemented -- currently cannot read from a UniStdioFile!
};
/**
+ * @brief Check if there is error.
+ * @return true if there is an error.
+ */
+inline bool UniFile::UniError::HasError() const
+{
+ return !desc.empty();
+}
+
+/**
+ * @brief Clears the existing error.
+ */
+inline void UniFile::UniError::ClearError()
+{
+ desc.erase();
+}
+
+/**
+ * @brief Get the error string.
+ * @return Error string.
+ */
+inline String UniFile::UniError::GetError() const
+{
+ return desc;
+}
+
+/**
* @brief Local file access code used by both UniMemFile and UniStdioFile
*
* This class lacks an actual handle to a file
unsigned char *m_current; // current location in file
};
+/** @brief Is it currently attached to a file ? */
+inline bool UniMemFile::IsOpen() const
+{
+ // We don't test the handle here, because we allow "opening" empty file
+ // but memory-mapping doesn't work on that, so that uses a special state
+ // of no handle, but linenumber of 0
+ return m_lineno >= 0;
+}
+
+/**
+ * @brief Returns if file has a BOM bytes.
+ * @return true if file has BOM bytes, false otherwise.
+ */
+inline bool UniMemFile::HasBom() const
+{
+ return m_bom;
+}
+
+/**
+ * @brief Sets if file has BOM or not.
+ * @param [in] true to have a BOM in file, false to not to have.
+ */
+inline void UniMemFile::SetBom(bool bom)
+{
+ m_bom = bom;
+}
+
/**
* @brief Regular buffered file (write-only access)
* (ReadString methods have never been implemented,
int64_t m_data; // offset after any initial BOM
ucr::buffer m_ucrbuff;
};
+
+/** @brief Is it currently attached to a file ? */
+inline bool UniStdioFile::IsOpen() const
+{
+ return m_fp != 0;
+}
+
+/**
+ * @brief Returns if file has a BOM bytes.
+ * @return true if file has BOM bytes, false otherwise.
+ */
+inline bool UniStdioFile::HasBom() const
+{
+ return m_bom;
+}
+
+/**
+ * @brief Sets if file has BOM or not.
+ * @param [in] true to have a BOM in file, false to not to have.
+ */
+inline void UniStdioFile::SetBom(bool bom)
+{
+ m_bom = bom;
+}
+
+
}
/**
- * @brief Return file version string.
- * @return File version as string.
- */
-String CVersionInfo::GetFileVersion() const
-{
- return m_strFileVersion;
-}
-
-/**
- * @brief Return private build value.
- * @return Private build number as string.
- */
-String CVersionInfo::GetPrivateBuild() const
-{
- return m_strPrivateBuild;
-}
-
-/**
- * @brief Return special build value.
- * @return Special build number as string.
- */
-String CVersionInfo::GetSpecialBuild() const
-{
- return m_strSpecialBuild;
-}
-
-/**
- * @brief Return company name.
- * @return Company name.
- */
-String CVersionInfo::GetCompanyName() const
-{
- return m_strCompanyName;
-}
-
-/**
- * @brief Return file description string.
- * @return File description string.
- */
-String CVersionInfo::GetFileDescription() const
-{
- return m_strFileDescription;
-}
-
-/**
- * @brief Return internal name.
- * @return Internal name.
- */
-String CVersionInfo::GetInternalName() const
-{
- return m_strInternalName;
-}
-
-/**
- * @brief Return full file name.
- * @return full file name.
- */
-String CVersionInfo::GetFullFileName() const
-{
- return m_strFileName;
-}
-
-/**
- * @brief Return copyright info.
- * @return Copyright info.
- */
-String CVersionInfo::GetLegalCopyright() const
-{
- return m_strLegalCopyright;
-}
-
-/**
- * @brief Return original filename.
- * @return Original filename.
- */
-String CVersionInfo::GetOriginalFilename() const
-{
- return m_strOriginalFilename;
-}
-
-/**
- * @brief Return product's version number.
- * @return Product's version number as string.
- */
-String CVersionInfo::GetProductVersion() const
-{
- return m_strProductVersion;
-}
-
-/**
* @brief Format version string from numbers.
* Version number consists of four WORD (16-bit) numbers. This function
* formats those numbers to string, where numbers are separated by
}
/**
- * @brief Return comment string.
- * @return Comment string.
- */
-String CVersionInfo::GetComments() const
-{
- return m_strComments;
-}
-
-/**
* @brief Read version info from file.
* This function reads version information from file's version resource
* to member variables.
void QueryValue(LPCTSTR szId, String& s);
bool GetCodepageForLanguage(WORD wLanguage, WORD & wCodePage);
};
+
+/**
+ * @brief Return file version string.
+ * @return File version as string.
+ */
+inline String CVersionInfo::GetFileVersion() const
+{
+ return m_strFileVersion;
+}
+
+/**
+ * @brief Return private build value.
+ * @return Private build number as string.
+ */
+inline String CVersionInfo::GetPrivateBuild() const
+{
+ return m_strPrivateBuild;
+}
+
+/**
+ * @brief Return special build value.
+ * @return Special build number as string.
+ */
+inline String CVersionInfo::GetSpecialBuild() const
+{
+ return m_strSpecialBuild;
+}
+
+/**
+ * @brief Return company name.
+ * @return Company name.
+ */
+inline String CVersionInfo::GetCompanyName() const
+{
+ return m_strCompanyName;
+}
+
+/**
+ * @brief Return file description string.
+ * @return File description string.
+ */
+inline String CVersionInfo::GetFileDescription() const
+{
+ return m_strFileDescription;
+}
+
+/**
+ * @brief Return internal name.
+ * @return Internal name.
+ */
+inline String CVersionInfo::GetInternalName() const
+{
+ return m_strInternalName;
+}
+
+/**
+ * @brief Return full file name.
+ * @return full file name.
+ */
+inline String CVersionInfo::GetFullFileName() const
+{
+ return m_strFileName;
+}
+
+/**
+ * @brief Return copyright info.
+ * @return Copyright info.
+ */
+inline String CVersionInfo::GetLegalCopyright() const
+{
+ return m_strLegalCopyright;
+}
+
+/**
+ * @brief Return original filename.
+ * @return Original filename.
+ */
+inline String CVersionInfo::GetOriginalFilename() const
+{
+ return m_strOriginalFilename;
+}
+
+/**
+ * @brief Return product's version number.
+ * @return Product's version number as string.
+ */
+inline String CVersionInfo::GetProductVersion() const
+{
+ return m_strProductVersion;
+}
+
+/**
+ * @brief Return comment string.
+ * @return Comment string.
+ */
+inline String CVersionInfo::GetComments() const
+{
+ return m_strComments;
+}
+
}
/**
- * @brief Increase found items (dirs and files) count.
- * @param [in] count Amount of items to add.
- */
-void CompareStats::IncreaseTotalItems(int count /*= 1*/)
-{
- m_nTotalItems += count;
-}
-
-/**
* @brief Add compared item.
* @param [in] code Resultcode to add.
*/
assert(m_nComparedItems <= m_nTotalItems);
}
-/**
- * @brief Return count by resultcode.
- * @param [in] result Resultcode to return.
- * @return Count of items for given resultcode.
- */
-int CompareStats::GetCount(CompareStats::RESULT result) const
-{
- return m_counts[result];
-}
-
-/**
- * @brief Return total count of items (so far) found.
- */
-int CompareStats::GetTotalItems() const
-{
- return m_nTotalItems;
-}
-
/**
* @brief Return item taking most time among current items.
*/
}
/**
- * @brief Return current comparestate.
- */
-CompareStats::CMP_STATE CompareStats::GetCompareState() const
-{
- return m_state;
-}
-
-/**
* @brief Convert diffcode to compare-result.
* @param [in] diffcode DIFFITEM.diffcode to convert.
* @return Compare result.
std::vector<ThreadState> m_rgThreadState;
};
+
+/**
+ * @brief Increase found items (dirs and files) count.
+ * @param [in] count Amount of items to add.
+ */
+inline void CompareStats::IncreaseTotalItems(int count)
+{
+ m_nTotalItems += count;
+}
+
+/**
+ * @brief Return count by resultcode.
+ * @param [in] result Resultcode to return.
+ * @return Count of items for given resultcode.
+ */
+inline int CompareStats::GetCount(CompareStats::RESULT result) const
+{
+ return m_counts[result];
+}
+
+/**
+ * @brief Return total count of items (so far) found.
+ */
+inline int CompareStats::GetTotalItems() const
+{
+ return m_nTotalItems;
+}
+
+/**
+ * @brief Return current comparestate.
+ */
+inline CompareStats::CMP_STATE CompareStats::GetCompareState() const
+{
+ return m_state;
+}
);
}
-
-/**
- * @brief Return logfile name and path
- */
-String CConfigLog::GetFileName() const
-{
- return m_sFileName;
-}
-
-
/**
* @brief Get the Modified time of fully qualified file path and name
*/
String m_sFileName;
std::unique_ptr<UniStdioFile> m_pfile;
};
+
+/**
+ * @brief Return logfile name and path
+ */
+inline String CConfigLog::GetFileName() const
+{
+ return m_sFileName;
+}
encoding.Clear();
m_textStats.clear();
}
-
-/**
- * @brief Return true if file is in any Unicode encoding
- */
-bool DiffFileInfo::IsEditableEncoding() const
-{
- return !encoding.m_bom;
-}
void ClearPartial();
bool IsEditableEncoding() const;
};
+
+/**
+ * @brief Return true if file is in any Unicode encoding
+ */
+inline bool DiffFileInfo::IsEditableEncoding() const
+{
+ return !encoding.m_bom;
+}
}
/**
- * @brief Returns count of items in diff list.
- * This function returns total amount of items (diffs) in list. So returned
- * count includes significant and non-significant diffs.
- * @note Use GetSignificantDiffs() to get count of non-ignored diffs.
- */
-int DiffList::GetSize() const
-{
- return (int) m_diffs.size();
-}
-
-/**
* @brief Returns count of significant diffs in the list.
* This function returns total count of significant diffs in list. So returned
* count doesn't include non-significant diffs.
}
/**
- * @brief Check if diff-list contains significant diffs.
- * @return true if list has significant diffs, false otherwise.
- */
-bool DiffList::HasSignificantDiffs() const
-{
- if (m_firstSignificant == -1)
- return false;
- return true;
-}
-
-/**
* @brief Return previous diff index from given line.
* @param [in] nLine First line searched.
* @return Index for next difference or -1 if no difference is found.
}
}
-/**
- * @brief Return index to first significant difference.
- * @return Index of first significant difference.
- */
-int DiffList::FirstSignificantDiff() const
-{
- return m_firstSignificant;
-}
-
-/**
- * @brief Return index of next significant diff.
- * @param [in] nDiff Index to start looking for next diff.
- * @return Index of next significant difference.
- */
-int DiffList::NextSignificantDiff(int nDiff) const
-{
- return (int)m_diffs[nDiff].next;
-}
-
-/**
- * @brief Return index of previous significant diff.
- * @param [in] nDiff Index to start looking for previous diff.
- * @return Index of previous significant difference.
- */
-int DiffList::PrevSignificantDiff(int nDiff) const
-{
- return (int)m_diffs[nDiff].prev;
-}
-
-/**
- * @brief Return index to last significant diff.
- * @return Index of last significant difference.
- */
-int DiffList::LastSignificantDiff() const
-{
- return m_lastSignificant;
-}
/**
* @brief Return pointer to first significant diff.
int m_lastSignificantRightOnly;
int m_lastSignificantConflict;
};
+
+/**
+ * @brief Returns count of items in diff list.
+ * This function returns total amount of items (diffs) in list. So returned
+ * count includes significant and non-significant diffs.
+ * @note Use GetSignificantDiffs() to get count of non-ignored diffs.
+ */
+inline int DiffList::GetSize() const
+{
+ return (int) m_diffs.size();
+}
+
+/**
+ * @brief Check if diff-list contains significant diffs.
+ * @return true if list has significant diffs, false otherwise.
+ */
+inline bool DiffList::HasSignificantDiffs() const
+{
+ return (m_firstSignificant != -1);
+}
+
+/**
+ * @brief Return index to first significant difference.
+ * @return Index of first significant difference.
+ */
+inline int DiffList::FirstSignificantDiff() const
+{
+ return m_firstSignificant;
+}
+
+/**
+ * @brief Return index of next significant diff.
+ * @param [in] nDiff Index to start looking for next diff.
+ * @return Index of next significant difference.
+ */
+inline int DiffList::NextSignificantDiff(int nDiff) const
+{
+ return (int)m_diffs[nDiff].next;
+}
+
+/**
+ * @brief Return index of previous significant diff.
+ * @param [in] nDiff Index to start looking for previous diff.
+ * @return Index of previous significant difference.
+ */
+inline int DiffList::PrevSignificantDiff(int nDiff) const
+{
+ return (int)m_diffs[nDiff].prev;
+}
+
+/**
+ * @brief Return index to last significant diff.
+ * @return Index of last significant difference.
+ */
+inline int DiffList::LastSignificantDiff() const
+{
+ return m_lastSignificant;
+}
}
/**
- * @brief Set the folder for temp files.
- * @param [in] path Temp files folder.
- */
-void CDiffTextBuffer::SetTempPath(const String &path)
-{
- m_strTempPath = path;
-}
-
-/**
- * @brief Is the buffer initialized?
- * @return true if the buffer is initialized, false otherwise.
- */
-bool CDiffTextBuffer::IsInitialized() const
-{
- return !!m_bInit;
-}
-
-/**
* @brief Load file from disk into buffer
*
* @param [in] pszFileNameInit File to load
int nStartPos, int nEndLine, int nEndPos,
int nAction = CE_ACTION_UNKNOWN, bool bHistory = true) override;
};
+
+/**
+ * @brief Set the folder for temp files.
+ * @param [in] path Temp files folder.
+ */
+inline void CDiffTextBuffer::SetTempPath(const String &path)
+{
+ m_strTempPath = path;
+}
+
+/**
+ * @brief Is the buffer initialized?
+ * @return true if the buffer is initialized, false otherwise.
+ */
+inline bool CDiffTextBuffer::IsInitialized() const
+{
+ return !!m_bInit;
+}
+
}
/**
- * @brief Sets context pointer forwarded to thread.
- * @param [in] pCtx Pointer to compare context.
- */
-void CDiffThread::SetContext(CDiffContext * pCtx)
-{
- m_pDiffContext = pCtx;
-}
-
-/**
* @brief runtime interface for child thread, called on child thread
*/
bool CDiffThread::ShouldAbort() const
}
/**
- * @brief Returns thread's current state
- */
-unsigned CDiffThread::GetThreadState() const
-{
- return m_pDiffParm->nThreadState;
-}
-
-/**
* @brief Item collection thread function.
*
* This thread is responsible for finding and collecting all items to compare
bool m_bAborting; /**< Is compare aborting? */
bool m_bPaused; /**< Is compare paused? */
};
+
+/**
+ * @brief Sets context pointer forwarded to thread.
+ * @param [in] pCtx Pointer to compare context.
+ */
+inline void CDiffThread::SetContext(CDiffContext * pCtx)
+{
+ m_pDiffContext = pCtx;
+}
+
+/**
+ * @brief Returns thread's current state
+ */
+inline unsigned CDiffThread::GetThreadState() const
+{
+ return m_pDiffParm->nThreadState;
+}
}
/**
- * @brief Set plugins enabled/disabled.
- * @param [in] enable if true plugins are enabled.
- */
-void CDiffWrapper::EnablePlugins(bool enable)
-{
- m_bPluginsEnabled = enable;
-}
-
-/**
* @brief Enables/disables patch-file creation and sets filename.
* This function enables or disables patch file creation. When
* @p filename is empty, patch files are disabled.
m_options.SetFromDiffOptions(*options);
}
-/**
- * @brief Set text tested to find the prediffer automatically.
- * Most probably a concatenated string of both filenames.
- */
-void CDiffWrapper::SetTextForAutomaticPrediff(const String &text)
-{
- m_sToFindPrediffer = text;
-}
void CDiffWrapper::SetPrediffer(const PrediffingInfo * prediffer /*= nullptr*/)
{
// all flags are set correctly during the construction
if (prediffer != nullptr)
*m_infoPrediffer = *prediffer;
}
-void CDiffWrapper::GetPrediffer(PrediffingInfo * prediffer) const
-{
- *prediffer = *m_infoPrediffer;
-}
/**
* @brief Set options used for patch-file creation.
}
/**
- * @brief Set source paths for original (NON-TEMP) diffing two files.
- * Sets full paths to two (NON-TEMP) files we are diffing.
- * @param [in] OriginalFile1 First file to compare "(NON-TEMP) file".
- * @param [in] OriginalFile2 Second file to compare "(NON-TEMP) file".
- */
-void CDiffWrapper::SetCompareFiles(const PathContext &originalFile)
-{
- m_originalFile = originalFile;
-}
-
-/**
- * @brief Set alternative paths for compared files.
- * Sets alternative paths for diff'ed files. These alternative paths might not
- * be real paths. For example when creating a patch file from folder compare
- * we want to use relative paths.
- * @param [in] altPaths Alternative file paths.
- */
-void CDiffWrapper::SetAlternativePaths(const PathContext &altPaths)
-{
- m_alternativePaths = altPaths;
-}
-
-/**
* @brief Runs diff-engine.
*/
bool CDiffWrapper::RunFileDiff()
#include "CompareOptions.h"
#include "DiffList.h"
#include "UnicodeString.h"
+#include "FileTransform.h"
class CDiffContext;
class PrediffingInfo;
const FilterCommentsManager* m_pFilterCommentsManager; /**< Comments filtering manager */
bool m_bPluginsEnabled; /**< Are plugins enabled? */
};
+
+/**
+ * @brief Set text tested to find the prediffer automatically.
+ * Most probably a concatenated string of both filenames.
+ */
+inline void CDiffWrapper::SetTextForAutomaticPrediff(const String &text)
+{
+ m_sToFindPrediffer = text;
+}
+
+inline void CDiffWrapper::GetPrediffer(PrediffingInfo * prediffer) const
+{
+ *prediffer = *m_infoPrediffer;
+}
+
+/**
+ * @brief Set plugins enabled/disabled.
+ * @param [in] enable if true plugins are enabled.
+ */
+inline void CDiffWrapper::EnablePlugins(bool enable)
+{
+ m_bPluginsEnabled = enable;
+}
+
+/**
+ * @brief Set source paths for original (NON-TEMP) diffing two files.
+ * Sets full paths to two (NON-TEMP) files we are diffing.
+ * @param [in] OriginalFile1 First file to compare "(NON-TEMP) file".
+ * @param [in] OriginalFile2 Second file to compare "(NON-TEMP) file".
+ */
+inline void CDiffWrapper::SetCompareFiles(const PathContext &originalFile)
+{
+ m_originalFile = originalFile;
+}
+
+/**
+ * @brief Set alternative paths for compared files.
+ * Sets alternative paths for diff'ed files. These alternative paths might not
+ * be real paths. For example when creating a patch file from folder compare
+ * we want to use relative paths.
+ * @param [in] altPaths Alternative file paths.
+ */
+inline void CDiffWrapper::SetAlternativePaths(const PathContext &altPaths)
+{
+ m_alternativePaths = altPaths;
+}
+
// EXCEPTION: OCX Property Pages should return FALSE
}
-/**
- * @brief Set pointer to compare stats.
- * @param [in] pCompareStats Pointer to stats.
- */
-void DirCompProgressBar::SetCompareStat(CompareStats * pCompareStats)
-{
- m_pCompareStats = pCompareStats;
-}
-
void DirCompProgressBar::SetProgressState(int comparedItems, int totalItems)
{
CProgressCtrl *pProg = (CProgressCtrl*) GetDlgItem(IDC_PROGRESSCOMPARE);
#endif
};
+/**
+ * @brief Set pointer to compare stats.
+ * @param [in] pCompareStats Pointer to stats.
+ */
+inline void DirCompProgressBar::SetCompareStat(CompareStats * pCompareStats)
+{
+ m_pCompareStats = pCompareStats;
+}
+
}
/**
- * @brief Set left/middle/right side readonly-status
- * @param nIndex Select side to set
- * @param bReadOnly New status of selected side
- */
-void CDirDoc::SetReadOnly(int nIndex, bool bReadOnly)
-{
- m_bRO[nIndex] = bReadOnly;
-}
-
-/**
- * @brief Return left/middle/right side readonly-status
- * @param nIndex Select side to ask
- */
-bool CDirDoc::GetReadOnly(int nIndex) const
-{
- return m_bRO[nIndex];
-}
-
-const bool *CDirDoc::GetReadOnly(void) const
-{
- return m_bRO;
-}
-
-/**
* @brief Write path and filename to headerbar
* @note SetText() does not repaint unchanged text
*/
bool m_bGeneratingReport;
std::unique_ptr<DirCmpReport> m_pReport;
};
+
+/**
+ * @brief Set left/middle/right side readonly-status
+ * @param nIndex Select side to set
+ * @param bReadOnly New status of selected side
+ */
+inline void CDirDoc::SetReadOnly(int nIndex, bool bReadOnly)
+{
+ m_bRO[nIndex] = bReadOnly;
+}
+
+/**
+ * @brief Return left/middle/right side readonly-status
+ * @param nIndex Select side to ask
+ */
+inline bool CDirDoc::GetReadOnly(int nIndex) const
+{
+ return m_bRO[nIndex];
+}
+
+inline const bool *CDirDoc::GetReadOnly(void) const
+{
+ return m_bRO;
+}
+
}
/**
- * @brief Get the interface to the header (path) bar
- */
-IHeaderBar * CDirFrame::GetHeaderInterface() {
- return &m_wndFilePathBar;
-}
-
-/**
* @brief Restore maximized state of directory compare window
*/
void CDirFrame::ActivateFrame(int nCmdShow)
DECLARE_MESSAGE_MAP()
};
+/**
+ * @brief Get the interface to the header (path) bar
+ */
+inline IHeaderBar * CDirFrame::GetHeaderInterface() {
+ return &m_wndFilePathBar;
+}
+
#include "MergeApp.h"
#include "OptionsDef.h"
#include "OptionsMgr.h"
+#include "PathContext.h"
#include "DebugNew.h"
using Poco::NotificationQueue;
return CSize(SHRT_MAX, tm.tmHeight + 6);
}
-void CEditorFilePathBar::SetPaneCount(int nPanes)
-{
- m_nPanes = nPanes;
-}
-
/**
* @brief Resize both controls to an equal size.
*/
}
/**
- * @brief Set callback function on EN_SETFOCUS notification
- */
-void CEditorFilePathBar::SetOnSetFocusCallback(const std::function<void(int)> callbackfunc)
-{
- m_callbackfunc = callbackfunc;
-}
-
-/**
* @brief Set widths.
* This function resizes both controls to given size. The width is usually
* same as the splitter view width.
int m_nPanes;
std::function<void(int)> m_callbackfunc;
};
+
+inline void CEditorFilePathBar::SetPaneCount(int nPanes)
+{
+ m_nPanes = nPanes;
+}
+
+/**
+ * @brief Set callback function on EN_SETFOCUS notification
+ */
+inline void CEditorFilePathBar::SetOnSetFocusCallback(const std::function<void(int)> callbackfunc)
+{
+ m_callbackfunc = callbackfunc;
+}
+
}
/**
- * @brief Set parent window used for showing MessageBoxes.
- * @param [in] hWnd Handle to parent window.
- */
-void FileActionScript::SetParentWindow(HWND hWnd)
-{
- m_hParentWindow = hWnd;
-}
-
-/**
- * @brief Does user want to move deleted files to Recycle Bin?
- * @param [in] bUseRecycleBin If `true` deleted files are moved to Recycle Bin.
- */
-void FileActionScript::UseRecycleBin(bool bUseRecycleBin)
-{
- m_bUseRecycleBin = bUseRecycleBin;
-}
-
-/**
- * @brief Return amount of actions (copy, move, etc) in script.
- * @return Amount of actions.
- */
-size_t FileActionScript::GetActionItemCount() const
-{
- return m_actions.size();
-}
-
-/**
* @brief Create ShellFileOperations operation lists from our scripts.
*
* We use ShellFileOperations internally to do actual file operations.
bool m_bUseRecycleBin; /**< Use recycle bin for script actions? */
HWND m_hParentWindow; /**< Parent window for showing messages */
};
+
+/**
+ * @brief Set parent window used for showing MessageBoxes.
+ * @param [in] hWnd Handle to parent window.
+ */
+inline void FileActionScript::SetParentWindow(HWND hWnd)
+{
+ m_hParentWindow = hWnd;
+}
+
+/**
+ * @brief Does user want to move deleted files to Recycle Bin?
+ * @param [in] bUseRecycleBin If `true` deleted files are moved to Recycle Bin.
+ */
+inline void FileActionScript::UseRecycleBin(bool bUseRecycleBin)
+{
+ m_bUseRecycleBin = bUseRecycleBin;
+}
+
+/**
+ * @brief Return amount of actions (copy, move, etc) in script.
+ * @return Amount of actions.
+ */
+inline size_t FileActionScript::GetActionItemCount() const
+{
+ return m_actions.size();
+}
+
{
}
-/**
- * @brief Return filtermanager used.
- */
-FileFilterMgr * FileFilterHelper::GetManager() const
-{
- return m_fileFilterMgr.get();
-}
-
/**
* @brief Store current filter path.
*
}
/**
- * @brief Returns true if active filter is a mask.
- */
-bool FileFilterHelper::IsUsingMask() const
-{
- return m_bUseMask;
-}
-
-/**
* @brief Returns active filter (or mask string)
* @return The active filter.
*/
String m_sGlobalFilterPath; /*< Path for shared filters */
String m_sUserSelFilterPath; /*< Path for user's private filters */
};
+
+/**
+ * @brief Return filtermanager used.
+ */
+inline FileFilterMgr * FileFilterHelper::GetManager() const
+{
+ return m_fileFilterMgr.get();
+}
+
+/**
+ * @brief Returns true if active filter is a mask.
+ */
+inline bool FileFilterHelper::IsUsingMask() const
+{
+ return m_bUseMask;
+}
+
}
/**
- * @brief Return name of filter.
- *
- * @param [in] i Index of filter.
- * @return Name of filter in given index.
- */
-String FileFilterMgr::GetFilterName(int i) const
-{
- return m_filters[i]->name;
-}
-
-/**
- * @brief Return name of filter.
- * @param [in] pFilter Filter to get name for.
- * @return Given filter's name.
- */
-String FileFilterMgr::GetFilterName(const FileFilter *pFilter) const
-{
- return pFilter->name;
-}
-
-/**
- * @brief Return description of filter.
- *
- * @param [in] i Index of filter.
- * @return Description of filter in given index.
- */
-String FileFilterMgr::GetFilterDesc(int i) const
-{
- return m_filters[i]->description;
-}
-
-/**
- * @brief Return description of filter.
- * @param [in] pFilter Filter to get description for.
- * @return Given filter's description.
- */
-String FileFilterMgr::GetFilterDesc(const FileFilter *pFilter) const
-{
- return pFilter->description;
-}
-
-/**
- * @brief Return full path to filter.
- *
- * @param [in] i Index of filter.
- * @return Full path of filter in given index.
- */
-String FileFilterMgr::GetFilterPath(int i) const
-{
- return m_filters[i]->fullpath;
-}
-
-/**
- * @brief Return full path to filter.
- *
- * @param [in] pFilter Pointer to filter.
- * @return Full path of filter.
- */
-String FileFilterMgr::GetFullpath(FileFilter * pfilter) const
-{
- return pfilter->fullpath;
-}
-
-/**
* @brief Reload filter from disk
*
* Reloads filter from disk. This is done by creating a new one
bool TestAgainstRegList(const std::vector<FileFilterElementPtr> *filterList, const String& szTest);
void EmptyFilterList(std::vector<FileFilterElementPtr> *filterList);
+
+/**
+ * @brief Return name of filter.
+ *
+ * @param [in] i Index of filter.
+ * @return Name of filter in given index.
+ */
+inline String FileFilterMgr::GetFilterName(int i) const
+{
+ return m_filters[i]->name;
+}
+
+/**
+ * @brief Return name of filter.
+ * @param [in] pFilter Filter to get name for.
+ * @return Given filter's name.
+ */
+inline String FileFilterMgr::GetFilterName(const FileFilter *pFilter) const
+{
+ return pFilter->name;
+}
+
+/**
+ * @brief Return description of filter.
+ *
+ * @param [in] i Index of filter.
+ * @return Description of filter in given index.
+ */
+inline String FileFilterMgr::GetFilterDesc(int i) const
+{
+ return m_filters[i]->description;
+}
+
+/**
+ * @brief Return description of filter.
+ * @param [in] pFilter Filter to get description for.
+ * @return Given filter's description.
+ */
+inline String FileFilterMgr::GetFilterDesc(const FileFilter *pFilter) const
+{
+ return pFilter->description;
+}
+
+/**
+ * @brief Return full path to filter.
+ *
+ * @param [in] i Index of filter.
+ * @return Full path of filter in given index.
+ */
+inline String FileFilterMgr::GetFilterPath(int i) const
+{
+ return m_filters[i]->fullpath;
+}
+
+/**
+ * @brief Return full path to filter.
+ *
+ * @param [in] pFilter Pointer to filter.
+ * @return Full path of filter.
+ */
+inline String FileFilterMgr::GetFullpath(FileFilter * pfilter) const
+{
+ return pfilter->fullpath;
+}
}
/**
- * @brief Reset version data to zeroes.
- */
-void FileVersion::Clear()
-{
- m_fileVersionMS = m_fileVersionLS = 0xffffffff;
-}
-
-/**
- * @brief Set file version number.
- * @param [in] versionMS Most significant dword for version.
- * @param [in] versionLS Least significant dword for version.
- */
-void FileVersion::SetFileVersion(unsigned versionMS, unsigned versionLS)
-{
- m_fileVersionMS = versionMS;
- m_fileVersionLS = versionLS;
-}
-
-/**
* @brief Get file version as a string.
* @return File version number as a string. Returns empty string if there is
* no version number for the file.
String GetFileVersionString() const;
uint64_t GetFileVersionQWORD() const { return (static_cast<uint64_t>(m_fileVersionMS) << 32) + m_fileVersionLS; };
};
+
+/**
+ * @brief Reset version data to zeroes.
+ */
+inline void FileVersion::Clear()
+{
+ m_fileVersionMS = m_fileVersionLS = 0xffffffff;
+}
+
+/**
+ * @brief Set file version number.
+ * @param [in] versionMS Most significant dword for version.
+ * @param [in] versionLS Least significant dword for version.
+ */
+inline void FileVersion::SetFileVersion(unsigned versionMS, unsigned versionLS)
+{
+ m_fileVersionMS = versionMS;
+ m_fileVersionLS = versionLS;
+}
+
};
/**
- * @brief Return the control's original text.
- * @return Control's original text.
- */
-void CFilepathEdit::GetOriginalText(String& rString) const
-{
- rString = m_sOriginalText;
-}
-
-/**
* @brief Set the text to show in the control.
* This function sets the text (original text) to show in the control.
* The control may modify the text for displaying in the GUI.
COLORREF m_crBackGnd; /**< Control's background color. */
CBrush m_brBackGnd; /**< Background brush for the control. */
};
+
+/**
+ * @brief Return the control's original text.
+ * @return Control's original text.
+ */
+inline void CFilepathEdit::GetOriginalText(String& rString) const
+{
+ rString = m_sOriginalText;
+}
+
}
/**
- * @brief Removes all expressions from the list.
- */
-void FilterList::RemoveAllFilters()
-{
- m_list.clear();
-}
-
-/**
- * @brief Returns if list has any expressions.
- * @return true if list contains one or more expressions.
- */
-bool FilterList::HasRegExps() const
-{
- return !m_list.empty();
-}
-
-/**
* @brief Match string against list of expressions.
* This function matches given @p string against the list of regular
* expressions. The matching ends when first match is found, so all
return retval;
}
-/**
- * @brief Returns the last matched expression (if any).
- * This function returns the regular expression string that matched last.
- * @return Last matched expression, or `nullptr` in case no matches yet.
- */
-const char * FilterList::GetLastMatchExpression() const
-{
- return m_lastMatchExpression->c_str();
-}
const std::string *m_lastMatchExpression;
};
+
+/**
+ * @brief Removes all expressions from the list.
+ */
+inline void FilterList::RemoveAllFilters()
+{
+ m_list.clear();
+}
+
+/**
+ * @brief Returns if list has any expressions.
+ * @return true if list contains one or more expressions.
+ */
+inline bool FilterList::HasRegExps() const
+{
+ return !m_list.empty();
+}
+
+/**
+ * @brief Returns the last matched expression (if any).
+ * This function returns the regular expression string that matched last.
+ * @return Last matched expression, or `nullptr` in case no matches yet.
+ */
+inline const char * FilterList::GetLastMatchExpression() const
+{
+ return m_lastMatchExpression->c_str();
+}
}
}
-IHeaderBar *CHexMergeFrame::GetHeaderInterface()
-{
- return &m_wndFilePathBar;
-}
-
-
void CHexMergeFrame::UpdateAutoPaneResize()
{
m_wndSplitter.AutoResizePanes(GetOptionsMgr()->GetBool(OPT_RESIZE_PANES));
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
+
+inline IHeaderBar *CHexMergeFrame::GetHeaderInterface()
+{
+ return &m_wndFilePathBar;
+}
+
}
/**
- * @brief Returns count of items in the list.
- * @return Count of filters in the list.
- */
-size_t LineFiltersList::GetCount() const
-{
- return m_items.size();
-}
-
-/**
- * @brief Empties the list.
- */
-void LineFiltersList::Empty()
-{
- m_items.clear();
-}
-
-/**
* @brief Returns the filter list as one filter string.
* This function returns the list of filters as one string that can be
* given to regular expression engine as filter. Filter strings in
std::vector<LineFilterItemPtr> m_items; /**< List for linefilter items */
COptionsMgr * m_pOptionsMgr; /**< Options-manager for storage */
};
+
+/**
+ * @brief Returns count of items in the list.
+ * @return Count of filters in the list.
+ */
+inline size_t LineFiltersList::GetCount() const
+{
+ return m_items.size();
+}
+
+/**
+ * @brief Empties the list.
+ */
+inline void LineFiltersList::Empty()
+{
+ m_items.clear();
+}
}
/**
- * @brief Stores HWND of frame window (CMergeEditFrame).
- */
-void CLocationView::SetFrameHwnd(HWND hwndFrame)
-{
- m_hwndFrame = hwndFrame;
-}
-
-/**
* @brief Request frame window to store sizes.
*
* When locationview size changes we want to save new size
inline CMergeDoc* CLocationView::GetDocument()
{ return reinterpret_cast<CMergeDoc*>(m_pDocument); }
#endif
+
+/**
+ * @brief Stores HWND of frame window (CMergeEditFrame).
+ */
+inline void CLocationView::SetFrameHwnd(HWND hwndFrame)
+{
+ m_hwndFrame = hwndFrame;
+}
+
return static_cast<int>(dlgMessage.DoModal());
}
-/**
- * @brief Set flag so that application will broadcast notification at next
- * idle time (via WM_TIMER id=IDLE_TIMER)
- */
-void CMergeApp::SetNeedIdleTimer()
-{
- m_bNeedIdleTimer = true;
-}
-
bool CMergeApp::IsReallyIdle() const
{
bool idle = true;
};
extern CMergeApp theApp;
+
+/**
+ * @brief Set flag so that application will broadcast notification at next
+ * idle time (via WM_TIMER id=IDLE_TIMER)
+ */
+inline void CMergeApp::SetNeedIdleTimer()
+{
+ m_bNeedIdleTimer = true;
+}
+
FlushAndRescan(true);
}
-/**
- * @brief return true if there are synchronization points
- */
-bool CMergeDoc::HasSyncPoints()
-{
- return m_bHasSyncPoints;
-}
-
std::vector<std::vector<int> > CMergeDoc::GetSyncPointList()
{
std::vector<std::vector<int> > list;
String GetFileExt(LPCTSTR sFileName, LPCTSTR sDescription) const;
void DoFileSave(int pane);
};
+
+/**
+ * @brief return true if there are synchronization points
+ */
+inline bool CMergeDoc::HasSyncPoints()
+{
+ return m_bHasSyncPoints;
+}
+
}
/**
- * @brief Enable/Disable automatic rescanning
- */
-bool CMergeEditView::EnableRescan(bool bEnable)
-{
- bool bOldValue = m_bAutomaticRescan;
- m_bAutomaticRescan = bEnable;
- return bOldValue;
-}
-
-/**
* @brief Handle some keys when in merging mode
*/
bool CMergeEditView::MergeModeKeyDown(MSG* pMsg)
}
/**
- * @brief Check if cursor is inside difference.
- * @return true if cursor is inside difference.
- */
-bool CMergeEditView::IsCursorInDiff() const
-{
- return m_bCurrentLineIsDiff;
-}
-
-/**
* @brief Determine if difference is visible on screen.
* @param [in] nDiff Number of diff to check.
* @return true if difference is visible.
inline CMergeDoc* CMergeEditView::GetDocument()
{ return reinterpret_cast<CMergeDoc*>(m_pDocument); }
#endif
+
+/**
+ * @brief Enable/Disable automatic rescanning
+ */
+inline bool CMergeEditView::EnableRescan(bool bEnable)
+{
+ bool bOldValue = m_bAutomaticRescan;
+ m_bAutomaticRescan = bEnable;
+ return bOldValue;
+}
+
+/**
+ * @brief Check if cursor is inside difference.
+ * @return true if cursor is inside difference.
+ */
+inline bool CMergeEditView::IsCursorInDiff() const
+{
+ return m_bCurrentLineIsDiff;
+}
+
}
/**
- * @brief Add patch item to internal list.
- * @param [in] pf Patch item to add.
- */
-void CPatchDlg::AddItem(const PATCHFILES& pf)
-{
- m_fileList.push_back(pf);
-}
-
-/**
- * @brief Returns amount of patch items in the internal list.
- * @return Count of patch items in the list.
- */
-size_t CPatchDlg::GetItemCount()
-{
- return m_fileList.size();
-}
-
-/**
- * @brief Return item in the internal list at given position
- * @param [in] position Zero-based index of item to get
- * @return PATCHFILES from given position.
- */
-const PATCHFILES& CPatchDlg::GetItemAt(size_t position)
-{
- return m_fileList.at(position);
-}
-
-/**
- * @brief Empties internal item list.
- */
-void CPatchDlg::ClearItems()
-{
- m_fileList.clear();
-}
-
-/**
* @brief Updates patch dialog settings from member variables.
*/
void CPatchDlg::UpdateSettings()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
+
+/**
+ * @brief Add patch item to internal list.
+ * @param [in] pf Patch item to add.
+ */
+inline void CPatchDlg::AddItem(const PATCHFILES& pf)
+{
+ m_fileList.push_back(pf);
+}
+
+/**
+ * @brief Returns amount of patch items in the internal list.
+ * @return Count of patch items in the list.
+ */
+inline size_t CPatchDlg::GetItemCount()
+{
+ return m_fileList.size();
+}
+
+/**
+ * @brief Return item in the internal list at given position
+ * @param [in] position Zero-based index of item to get
+ * @return PATCHFILES from given position.
+ */
+inline const PATCHFILES& CPatchDlg::GetItemAt(size_t position)
+{
+ return m_fileList.at(position);
+}
+
+/**
+ * @brief Empties internal item list.
+ */
+inline void CPatchDlg::ClearItems()
+{
+ m_fileList.clear();
+}
+
return m_sPath;
}
-String& PathInfo::GetRef()
-{
- return m_sPath;
-}
-
-/**
- * @brief Set path.
- * @param [in] sPath New path for item.
- */
-void PathInfo::SetPath(const TCHAR *sPath)
-{
- m_sPath = sPath;
-}
-
-void PathInfo::SetPath(const String & sPath)
-{
- m_sPath = sPath;
-}
-
/**
* @brief Normalize path.
*/
m_path[nIndex].SetPath(newElement);
}
-String PathContext::operator[](int nIndex) const
-{
- return GetAt(nIndex);
-}
-
-String& PathContext::operator[](int nIndex)
-{
- return GetElement(nIndex);
-}
-
-/**
- * @brief set number of files.
- */
-void PathContext::SetSize(int nFiles)
-{
- m_nFiles = nFiles;
-}
-
-/**
- * @brief Return number of files.
- */
-int PathContext::GetSize() const
-{
- return m_nFiles;
-}
-
/**
* @brief Empty m_path array
*/
else
m_path[0].m_sPath.swap(m_path[2].m_sPath);
}
-
-PathContextIterator PathContext::begin() const
-{
- return PathContextIterator(this);
-}
-
-PathContextIterator PathContext::end() const
-{
- return PathContextIterator();
-}
PathInfo(const PathInfo &pi);
String GetPath(bool bNormalized = true) const;
- String& GetRef();
+ String& GetRef() { return m_sPath; }
void SetPath(const TCHAR *path);
void SetPath(const String & path);
void NormalizePath();
};
/**
+ * @brief Set path.
+ * @param [in] sPath New path for item.
+ */
+inline void PathInfo::SetPath(const TCHAR *sPath)
+{
+ m_sPath = sPath;
+}
+
+inline void PathInfo::SetPath(const String & sPath)
+{
+ m_sPath = sPath;
+}
+
+/**
* @brief Holds path information of compared files/directories.
*/
class PathContext
String GetAt(int nIndex) const;
String& GetElement(int nIndex);
void SetAt(int nIndex, const String& newElement);
- String operator[](int nIndex) const;
- String& operator[](int nIndex);
+ String operator[](int nIndex) const { return GetAt(nIndex); }
+ String& operator[](int nIndex) { return GetElement(nIndex); }
String GetLeft(bool bNormalized = true) const;
String GetRight(bool bNormalized = true) const;
PathInfo m_path[3]; /**< First, second, third path (left path at start) */
};
+/**
+ * @brief set number of files.
+ */
+inline void PathContext::SetSize(int nFiles)
+{
+ m_nFiles = nFiles;
+}
+
+/**
+ * @brief Return number of files.
+ */
+inline int PathContext::GetSize() const
+{
+ return m_nFiles;
+}
+
class PathContextIterator : public std::iterator<std::forward_iterator_tag, String>
{
public:
const PathContext *m_pPathContext;
int m_sel;
};
+
+inline PathContextIterator PathContext::begin() const
+{
+ return PathContextIterator(this);
+}
+
+inline PathContextIterator PathContext::end() const
+{
+ return PathContextIterator();
+}
}
/**
- * @brief Returns if left path is defined in project file.
- * @return true if project file has left path.
- */
-bool ProjectFileItem::HasLeft() const
-{
- return m_bHasLeft;
-}
-
-/**
- * @brief Returns if middle path is defined.
- */
-bool ProjectFileItem::HasMiddle() const
-{
- return m_bHasMiddle;
-}
-
-/**
- * @brief Returns if right path is defined in project file.
- * @return true if project file has right path.
- */
-bool ProjectFileItem::HasRight() const
-{
- return m_bHasRight;
-}
-
-/**
- * @brief Returns if filter is defined in project file.
- * @return true if project file has filter.
- */
-bool ProjectFileItem::HasFilter() const
-{
- return m_bHasFilter;
-}
-
-/**
- * @brief Returns if subfolder is defined in projectfile.
- * @return true if project file has subfolder definition.
- */
-bool ProjectFileItem::HasSubfolders() const
-{
- return m_bHasSubfolders;
-}
-
-/**
* @brief Returns left path.
* @param [out] pReadOnly true if readonly was specified for path.
* @return Left path.
}
/**
- * @brief Returns if left path is specified read-only.
- * @return true if left path is read-only, false otherwise.
- */
-bool ProjectFileItem::GetLeftReadOnly() const
-{
- return m_bLeftReadOnly;
-}
-
-/**
* @brief Set left path, returns old left path.
* @param [in] sLeft Left path.
* @param [in] bReadOnly Will path be recorded read-only?
}
/**
- * @brief Returns if middle path is specified read-only.
- */
-bool ProjectFileItem::GetMiddleReadOnly() const
-{
- return m_bMiddleReadOnly;
-}
-
-/**
* @brief Set middle path, returns old middle path.
* @param [in] sMiddle Middle path.
* @param [in] bReadOnly Will path be recorded read-only?
}
/**
- * @brief Returns if right path is specified read-only.
- * @return true if right path is read-only, false otherwise.
- */
-bool ProjectFileItem::GetRightReadOnly() const
-{
- return m_bRightReadOnly;
-}
-
-/**
* @brief Set right path, returns old right path.
* @param [in] sRight Right path.
* @param [in] bReadOnly Will path be recorded read-only?
}
/**
- * @brief Returns filter.
- * @return Filter string.
- */
-String ProjectFileItem::GetFilter() const
-{
- return m_filter;
-}
-
-/**
- * @brief Set filter.
- * @param [in] sFilter New filter string to set.
- */
-void ProjectFileItem::SetFilter(const String& sFilter)
-{
- m_filter = sFilter;
-}
-
-/**
- * @brief Returns subfolder included -setting.
- * @return != 0 if subfolders are included.
- */
-int ProjectFileItem::GetSubfolders() const
-{
- return m_subfolders;
-}
-
-/**
- * @brief set subfolder.
- * @param [in] iSubfolder New value for subfolder inclusion.
- */
-void ProjectFileItem::SetSubfolders(bool bSubfolder)
-{
- m_subfolders = bSubfolder ? 1 : 0;
-}
-
-/**
- * @brief
- *
- * @param [in] files Files in project
- * @param [in] bSubFolders If true subfolders included (recursive compare)
- */
-void ProjectFileItem::SetPaths(const PathContext& files, bool bSubfolders)
-{
- m_paths = files;
- m_subfolders = bSubfolders;
-}
-
-/**
* @brief Returns left and right paths and recursive from project file
*
* @param [out] files Files in project
private:
std::list<ProjectFileItem> m_items;
};
+
+/**
+ * @brief Returns if left path is defined in project file.
+ * @return true if project file has left path.
+ */
+inline bool ProjectFileItem::HasLeft() const
+{
+ return m_bHasLeft;
+}
+
+/**
+ * @brief Returns if middle path is defined.
+ */
+inline bool ProjectFileItem::HasMiddle() const
+{
+ return m_bHasMiddle;
+}
+
+/**
+ * @brief Returns if right path is defined in project file.
+ * @return true if project file has right path.
+ */
+inline bool ProjectFileItem::HasRight() const
+{
+ return m_bHasRight;
+}
+
+/**
+ * @brief Returns if filter is defined in project file.
+ * @return true if project file has filter.
+ */
+inline bool ProjectFileItem::HasFilter() const
+{
+ return m_bHasFilter;
+}
+
+/**
+ * @brief Returns if subfolder is defined in projectfile.
+ * @return true if project file has subfolder definition.
+ */
+inline bool ProjectFileItem::HasSubfolders() const
+{
+ return m_bHasSubfolders;
+}
+
+/**
+ * @brief Returns if left path is specified read-only.
+ * @return true if left path is read-only, false otherwise.
+ */
+inline bool ProjectFileItem::GetLeftReadOnly() const
+{
+ return m_bLeftReadOnly;
+}
+
+/**
+ * @brief Returns if middle path is specified read-only.
+ */
+inline bool ProjectFileItem::GetMiddleReadOnly() const
+{
+ return m_bMiddleReadOnly;
+}
+
+/**
+ * @brief Returns if right path is specified read-only.
+ * @return true if right path is read-only, false otherwise.
+ */
+inline bool ProjectFileItem::GetRightReadOnly() const
+{
+ return m_bRightReadOnly;
+}
+
+/**
+ * @brief Returns filter.
+ * @return Filter string.
+ */
+inline String ProjectFileItem::GetFilter() const
+{
+ return m_filter;
+}
+
+/**
+ * @brief Set filter.
+ * @param [in] sFilter New filter string to set.
+ */
+inline void ProjectFileItem::SetFilter(const String& sFilter)
+{
+ m_filter = sFilter;
+}
+
+/**
+ * @brief Returns subfolder included -setting.
+ * @return != 0 if subfolders are included.
+ */
+inline int ProjectFileItem::GetSubfolders() const
+{
+ return m_subfolders;
+}
+
+/**
+ * @brief set subfolder.
+ * @param [in] iSubfolder New value for subfolder inclusion.
+ */
+inline void ProjectFileItem::SetSubfolders(bool bSubfolder)
+{
+ m_subfolders = bSubfolder ? 1 : 0;
+}
+
+/**
+ * @brief
+ *
+ * @param [in] files Files in project
+ * @param [in] bSubFolders If true subfolders included (recursive compare)
+ */
+inline void ProjectFileItem::SetPaths(const PathContext& files, bool bSubfolders)
+{
+ m_paths = files;
+ m_subfolders = bSubfolders;
+}
+