File indexing completed on 2024-04-28 16:01:33
0001 /****************************************************************************** 0002 * This file is part of the libqgit2 library 0003 * Copyright (c) 2011 Laszlo Papp <djszapi@archlinux.us> 0004 * Copyright (C) 2013 Leonardo Giordani 0005 * 0006 * This library is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Lesser General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2.1 of the License, or (at your option) any later version. 0010 * 0011 * This library is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Lesser General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Lesser General Public 0017 * License along with this library; if not, write to the Free Software 0018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 0019 */ 0020 0021 #ifndef LIBQGIT2_TAG_H 0022 #define LIBQGIT2_TAG_H 0023 0024 #include "qgitobject.h" 0025 0026 namespace LibQGit2 0027 { 0028 class OId; 0029 class Signature; 0030 0031 /** 0032 * @brief Wrapper class for git_tag. 0033 * Represents a Git tag object. 0034 * 0035 * @ingroup LibQGit2 0036 * @{ 0037 */ 0038 class LIBQGIT2_EXPORT Tag : public Object 0039 { 0040 public: 0041 0042 /** 0043 * Creates a Tag that points to tag. The pointer object becomes managed by 0044 * this Tag, and must not be passed to another Tag or closed outside this 0045 * object. 0046 */ 0047 explicit Tag(git_tag *tag = 0); 0048 0049 /** 0050 * Copy constructor; creates a copy of the object, sharing the same underlaying data 0051 * structure. 0052 */ 0053 Tag(const Tag& other); 0054 0055 /** 0056 * Destroys the object. 0057 */ 0058 ~Tag(); 0059 0060 /** 0061 * Get the id of a tag. 0062 * @return object identity for the tag. 0063 */ 0064 OId oid() const; 0065 0066 /** 0067 * Get the tagged object of a tag 0068 * 0069 * @throws LibQGit2::Exception 0070 */ 0071 Object target() const; 0072 0073 /** 0074 * Get the name of a tag 0075 * @return name of the tag 0076 */ 0077 const QString name() const; 0078 0079 /** 0080 * Get the tagger (author) of a tag 0081 * @return reference to the tag's author 0082 */ 0083 Signature tagger() const; 0084 0085 /** 0086 * Get the message of a tag 0087 * @return message of the tag 0088 */ 0089 const QString message(); 0090 0091 git_tag* data() const; 0092 const git_tag* constData() const; 0093 }; 0094 0095 /**@}*/ 0096 } 0097 0098 #endif // LIBQGIT2_TAG_H