| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2008 by Eran Ifrah |
| 5 |
// file name : commentconfigdata.cpp |
| 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 |
#include "commentconfigdata.h" |
| 26 |
|
| 27 |
CommentConfigData::CommentConfigData() |
| 28 |
{ |
| 29 |
m_classPattern << " * @class $(Name)\n"; |
| 30 |
m_classPattern << " * @author $(User)\n"; |
| 31 |
m_classPattern << " * @date $(Date)\n"; |
| 32 |
m_classPattern << " * @file $(CurrentFileName).$(CurrentFileExt)\n"; |
| 33 |
m_classPattern << " * @brief \n"; |
| 34 |
m_functionPattern << " * @brief \n"; |
| 35 |
} |
| 36 |
|
| 37 |
CommentConfigData::~CommentConfigData() {} |
| 38 |
|
| 39 |
void CommentConfigData::DeSerialize(Archive& arch) |
| 40 |
{ |
| 41 |
arch.Read("m_addStarOnCComment", m_addStarOnCComment); |
| 42 |
arch.Read("m_continueCppComment", m_continueCppComment); |
| 43 |
arch.Read("m_autoInsert", m_autoInsert); |
| 44 |
arch.Read("m_useQtStyle", m_useQtStyle); |
| 45 |
m_classPattern.Replace("|", "\n"); |
| 46 |
arch.Read("m_functionPattern", m_functionPattern); |
| 47 |
m_functionPattern.Replace("|", "\n"); |
| 48 |
arch.Read("m_functionPattern", m_functionPattern); |
| 49 |
} |
| 50 |
|
| 51 |
void CommentConfigData::Serialize(Archive& arch) |
| 52 |
{ |
| 53 |
arch.Write("m_addStarOnCComment", m_addStarOnCComment); |
| 54 |
arch.Write("m_continueCppComment", m_continueCppComment); |
| 55 |
arch.Write("m_autoInsert", m_autoInsert); |
| 56 |
arch.Write("m_useQtStyle", m_useQtStyle); |
| 57 |
m_classPattern.Replace("\n", "|"); |
| 58 |
arch.Write("m_classPattern", m_classPattern); |
| 59 |
m_functionPattern.Replace("\n", "|"); |
| 60 |
arch.Write("m_functionPattern", m_functionPattern); |
| 61 |
} |