Debian Codegraph @

CodeLite/comment.cpp

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2008 by Eran Ifrah
5 // file name : comment.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 "precompiled_header.h"
26 #include "comment.h"
27 #include <iostream>
28
29 Comment::Comment(const Comment& rhs)
30 {
31 *this = rhs;
32 }
33
34 Comment::Comment(const wxString & comment, const wxString & file, const int line)
35 : m_comment( comment )
36 , m_file( file )
37 , m_line( line )
38 {
39 m_comment.erase(m_comment.find_last_not_of(_T("\n\r\t"))+1);
40 }
41
42 Comment & Comment::operator=(const Comment &rhs)
43 {
44 if ( this == &rhs )
45 return *this;
46
47 m_comment = rhs.m_comment;
48 m_file = rhs.m_file;
49 m_line = rhs.m_line;
50 return *this;
51 }