Make test more complete
[vng.git] / patches / Branch.cpp
blobd86e2d8a369998847422070476867f6b7b41665c
1 /*
2 * This file is part of the vng project
3 * Copyright (C) 2008 Thomas Zander <tzander@trolltech.com>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #include "Branch.h"
19 #include "Commit_p.h"
21 class BranchPrivate : public CommitPrivate
23 public:
24 QString name;
28 Branch::Branch()
29 : Commit()
33 Branch::Branch(const QString &branchName)
34 : Commit(new BranchPrivate())
36 fillFromTreeIsm(branchName);
37 if (d)
38 static_cast<BranchPrivate*> (d)->name = branchName;
41 Branch::Branch(const Branch &other)
42 : Commit(other)
46 Branch::~Branch()
50 QString Branch::branchName() const
52 return static_cast<BranchPrivate*> (d)->name;