| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2008 by Eran Ifrah |
| 5 |
// file name : commentconfigdata.h |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
#ifndef __commentconfigdata__ |
| 26 |
#define __commentconfigdata__ |
| 27 |
|
| 28 |
#include "codelite_exports.h" |
| 29 |
#include "serialized_object.h" |
| 30 |
|
| 31 |
class WXDLLIMPEXP_CL CommentConfigData : public SerializedObject |
| 32 |
{ |
| 33 |
bool m_addStarOnCComment = true; |
| 34 |
bool m_continueCppComment = false; |
| 35 |
bool m_autoInsert = true; |
| 36 |
bool m_useQtStyle = false; |
| 37 |
wxString m_classPattern; |
| 38 |
wxString m_functionPattern; |
| 39 |
|
| 40 |
public: |
| 41 |
CommentConfigData(); |
| 42 |
virtual ~CommentConfigData(); |
| 43 |
|
| 44 |
public: |
| 45 |
virtual void DeSerialize(Archive& arch); |
| 46 |
virtual void Serialize(Archive& arch); |
| 47 |
|
| 48 |
// Setters |
| 49 |
void SetAddStarOnCComment(const bool& addStarOnCComment) { this->m_addStarOnCComment = addStarOnCComment; } |
| 50 |
void SetClassPattern(const wxString& classPattern) { this->m_classPattern = classPattern; } |
| 51 |
void SetContinueCppComment(const bool& continueCppComment) { this->m_continueCppComment = continueCppComment; } |
| 52 |
void SetFunctionPattern(const wxString& functionPattern) { this->m_functionPattern = functionPattern; } |
| 53 |
|
| 54 |
const bool& GetAddStarOnCComment() const { return m_addStarOnCComment; } |
| 55 |
const wxString& GetClassPattern() const { return m_classPattern; } |
| 56 |
const bool& GetContinueCppComment() const { return m_continueCppComment; } |
| 57 |
const wxString& GetFunctionPattern() const { return m_functionPattern; } |
| 58 |
void SetUseQtStyle(bool useQtStyle) { this->m_useQtStyle = useQtStyle; } |
| 59 |
bool IsUseQtStyle() const { return m_useQtStyle; } |
| 60 |
void SetAutoInsert(bool b) { this->m_autoInsert = b; } |
| 61 |
bool IsAutoInsert() const { return m_autoInsert; } |
| 62 |
wxString GetCommentBlockPrefix() const { return IsUseQtStyle() ? wxString("/*!") : wxString("/**"); } |
| 63 |
}; |
| 64 |
#endif // __commentconfigdata__ |