ufe  2.0
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
VerFormat.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ufe-full-windows/ufe/gitmodules/peptide/src/versioning/VerFormat.h"
2 //*****************************************************************************
3 // Copyright (c) 2020 Autodesk, Inc.
4 // All rights reserved.
5 //
6 // These coded instructions, statements, and computer programs contain
7 // unpublished proprietary information written by Autodesk, Inc. and are
8 // protected by Federal copyright law. They may not be disclosed to third
9 // parties or copied or duplicated in any form, in whole or in part, without
10 // the prior written consent of Autodesk, Inc.
11 //*****************************************************************************
12 
17 
18 #ifndef PEPTIDE_VER_VERSION_FORMAT_H
19 #define PEPTIDE_VER_VERSION_FORMAT_H
20 
21 //==============================================================================
22 // EXTERNAL DECLARATIONS
23 //==============================================================================
24 
25 #include <iomanip>
26 #include <sstream>
27 
28 namespace Peptide {
29 
30 //==============================================================================
31 // CLASS DECLARATIONS
32 //==============================================================================
33 
34 //==============================================================================
35 // CLASS VersionFormat
36 //==============================================================================
37 
57 template <class VersionTrait>
59 public:
60  /*----- static member functions -----*/
61 
66  std::ostringstream builder;
67  builder << VersionTrait::getMajorVersion() << "."
68  << VersionTrait::getMinorVersion() << "."
69  << VersionTrait::getPatchLevel();
70  return builder.str();
71  }
72 
83  std::ostringstream builder;
84  builder << VersionTrait::getProductName() << " version "
85  << getVersionID() << " (" << VersionTrait::getBuildDate()
86  << ", build " << VersionTrait::getBuildNumber() << ", commit "
87  << std::setw(7)
88  << std::string(VersionTrait::getGitCommit()).substr(0, 7)
89  << ", branch " << VersionTrait::getGitBranch() << ")";
90  return builder.str();
91  }
92 
93 private:
94  /*----- member functions -----*/
95 
99  VersionFormat() = delete;
100 };
101 
102 } // namespace Peptide
103 
104 #endif
std::string string(const Path &path)
VersionFormat()=delete
Prohibited and not implemented.
static std::string getVersionInfo()
Returns detailed information for the given version trait.
Definition: VerFormat.h:82
Utility class for formatting version information.
Definition: VerFormat.h:58
static std::string getVersionID()
Returns a short version identifier for the given version trait.
Definition: VerFormat.h:65