ufe 5.5
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 "W:/build/RelWithDebInfo/gitmodules/peptide/src/versioning/VerFormat.h"
2#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/gitmodules/peptide/src/versioning/VerFormat_src.h"
3//*****************************************************************************
4// Copyright (c) 2022 Autodesk, Inc.
5// All rights reserved.
6//
7// These coded instructions, statements, and computer programs contain
8// unpublished proprietary information written by Autodesk, Inc. and are
9// protected by Federal copyright law. They may not be disclosed to third
10// parties or copied or duplicated in any form, in whole or in part, without
11// the prior written consent of Autodesk, Inc.
12//*****************************************************************************
13
18
19#ifndef PEPTIDE_VER_VERSION_FORMAT_H
20#define PEPTIDE_VER_VERSION_FORMAT_H
21
22//==============================================================================
23// EXTERNAL DECLARATIONS
24//==============================================================================
25
26#include <iomanip>
27#include <sstream>
28
29#ifndef PEPTIDE_USE_FOUR_FIELD_VERSION
30#define PEPTIDE_USE_FOUR_FIELD_VERSION 0
31#endif
32
33namespace Peptide {
34
35//==============================================================================
36// CLASS DECLARATIONS
37//==============================================================================
38
39//==============================================================================
40// CLASS VersionFormat
41//==============================================================================
42
52#if PEPTIDE_USE_FOUR_FIELD_VERSION
54#endif
65template <class VersionTrait>
67public:
68 /*----- static member functions -----*/
69
70#if PEPTIDE_USE_FOUR_FIELD_VERSION
74 static std::string getVersionID() {
75 std::ostringstream builder;
76 builder << VersionTrait::getArchVersion() << "."
77 << VersionTrait::getMajorVersion() << "."
78 << VersionTrait::getMinorVersion() << "."
79 << VersionTrait::getPatchLevel();
80 return builder.str();
81 }
82#else
87 std::ostringstream builder;
88 builder << VersionTrait::getMajorVersion() << "."
89 << VersionTrait::getMinorVersion() << "."
90 << VersionTrait::getPatchLevel();
91 return builder.str();
92 }
93#endif
94
107 std::ostringstream builder;
108 builder << VersionTrait::getProductName() << " version "
109 << getVersionID() << " (" << VersionTrait::getBuildDate()
110 << ", build " << VersionTrait::getBuildNumber() << ", commit "
111 << std::setw(7)
112 << std::string(VersionTrait::getGitCommit()).substr(0, 7)
113 << ", branch " << VersionTrait::getGitBranch() << ")";
114 return builder.str();
115 }
116
117private:
118 /*----- member functions -----*/
119
123 VersionFormat() = delete;
124};
125
126} // namespace Peptide
127
128#endif
Utility class for formatting version information.
Definition: VerFormat.h:66
VersionFormat()=delete
Prohibited and not implemented.
static std::string getVersionInfo()
Returns detailed information for the given version trait.
Definition: VerFormat.h:106
static std::string getVersionID()
Returns a short version identifier for the given version trait.
Definition: VerFormat.h:86
std::string string(const Path &path)