libDwm-0.9.45
DwmCvsTag.hh
Go to the documentation of this file.
1//===========================================================================
2// @(#) $DwmPath$
3//===========================================================================
4// Copyright (c) Daniel W. McRobb 2000, 2016
5// All rights reserved.
6//
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions
9// are met:
10//
11// 1. Redistributions of source code must retain the above copyright
12// notice, this list of conditions and the following disclaimer.
13// 2. Redistributions in binary form must reproduce the above copyright
14// notice, this list of conditions and the following disclaimer in the
15// documentation and/or other materials provided with the distribution.
16// 3. The names of the authors and copyright holders may not be used to
17// endorse or promote products derived from this software without
18// specific prior written permission.
19//
20// IN NO EVENT SHALL DANIEL W. MCROBB BE LIABLE TO ANY PARTY FOR
21// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
22// INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE,
23// EVEN IF DANIEL W. MCROBB HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
24// DAMAGE.
25//
26// THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND
27// DANIEL W. MCROBB HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
28// UPDATES, ENHANCEMENTS, OR MODIFICATIONS. DANIEL W. MCROBB MAKES NO
29// REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, EITHER
30// IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31// WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
32// PURPOSE, OR THAT THE USE OF THIS SOFTWARE WILL NOT INFRINGE ANY PATENT,
33// TRADEMARK OR OTHER RIGHTS.
34//===========================================================================
35
36//---------------------------------------------------------------------------
39//---------------------------------------------------------------------------
40
41#ifndef _DWMCVSTAG_HH_
42#define _DWMCVSTAG_HH_
43
44#include <string>
45
46namespace Dwm {
47
48 //--------------------------------------------------------------------------
53 //--------------------------------------------------------------------------
54 class CvsTag
55 {
56 public:
57 //------------------------------------------------------------------------
59 //------------------------------------------------------------------------
60 CvsTag(const std::string & tagString);
61
62 //------------------------------------------------------------------------
64 //------------------------------------------------------------------------
65 std::string Name() const;
66
67 //------------------------------------------------------------------------
69 //------------------------------------------------------------------------
70 std::string Id() const;
71
72 //------------------------------------------------------------------------
74 //------------------------------------------------------------------------
75 std::string Author() const;
76
77 //------------------------------------------------------------------------
79 //------------------------------------------------------------------------
80 std::string Header() const;
81
82 //------------------------------------------------------------------------
84 //------------------------------------------------------------------------
85 std::string Date() const;
86
87 //------------------------------------------------------------------------
89 //------------------------------------------------------------------------
90 std::string RCSfile() const;
91
92 //------------------------------------------------------------------------
94 //------------------------------------------------------------------------
95 std::string Revision() const;
96
97 private:
98 std::string _tagString;
99
100 std::string GetRCSfileFromId() const;
101 std::string GetRevisionFromId() const;
102 std::string GetDateFromId() const;
103 std::string GetAuthorFromId() const;
104 std::string GetTag(const std::string & tag) const;
105 };
106
107} // namespace Dwm
108
109#endif // _DWMCVSTAG_HH_
110
111//---------------------------- emacs settings -----------------------------
112// Local Variables:
113// mode: C++
114// tab-width: 2
115// indent-tabs-mode: nil
116// c-basic-offset: 2
117// End:
118//-------------------------------------------------------------------------
This class can be used to wrap a string containing CVS keyword name/value pairs.
Definition DwmCvsTag.hh:55
std::string Name() const
Returns the value of the Name tag.
CvsTag(const std::string &tagString)
Constructor.
std::string Header() const
Returns the value of the Header tag.
std::string Id() const
Returns the value of the Id tag.
std::string RCSfile() const
Returns the value of the RCSfile tag.
std::string Revision() const
Returns the value of the Revision tag.
std::string Author() const
Returns the value of the Author tag.
std::string Date() const
Returns the value of the Date tag.