| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2008 by Eran Ifrah |
| 5 |
// file name : comment.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 CODELITE_COMMENT_H |
| 26 |
#define CODELITE_COMMENT_H |
| 27 |
|
| 28 |
#include <wx/string.h> |
| 29 |
#include "smart_ptr.h" |
| 30 |
|
| 31 |
class Comment |
| 32 |
{ |
| 33 |
wxString m_comment; |
| 34 |
wxString m_file; |
| 35 |
int m_line; |
| 36 |
|
| 37 |
public: |
| 38 |
/** |
| 39 |
* construct a Comment object |
| 40 |
* \param comment comment string |
| 41 |
* \param file comment file name |
| 42 |
* \param line comment line number |
| 43 |
*/ |
| 44 |
Comment(const wxString &comment, const wxString & file, const int line); |
| 45 |
|
| 46 |
/** |
| 47 |
* Copy constructor |
| 48 |
*/ |
| 49 |
Comment(const Comment& rhs); |
| 50 |
|
| 51 |
/** |
| 52 |
* Destructor |
| 53 |
*/ |
| 54 |
virtual ~Comment() {}; |
| 55 |
|
| 56 |
/// asgginment operator |
| 57 |
Comment& operator=(const Comment& rhs); |
| 58 |
|
| 59 |
/// accessors |
| 60 |
/** |
| 61 |
* Get the file name |
| 62 |
* \return file name |
| 63 |
*/ |
| 64 |
const wxString & GetFile() const { |
| 65 |
return m_file; |
| 66 |
} |
| 67 |
|
| 68 |
/** |
| 69 |
* Get string comment |
| 70 |
* \return comment |
| 71 |
*/ |
| 72 |
const wxString & GetComment() const { |
| 73 |
return m_comment; |
| 74 |
} |
| 75 |
|
| 76 |
/** |
| 77 |
* Get the line number |
| 78 |
* \return line number |
| 79 |
*/ |
| 80 |
const int & GetLine() const { |
| 81 |
return m_line; |
| 82 |
} |
| 83 |
}; |
| 84 |
|
| 85 |
typedef SmartPtr<Comment> CommentPtr; |
| 86 |
|
| 87 |
#endif // CODELITE_COMMENT_H |