Medial Code Documentation
Loading...
Searching...
No Matches
External
xgboost
src
common
version.h
1
4
#ifndef XGBOOST_COMMON_VERSION_H_
5
#define XGBOOST_COMMON_VERSION_H_
6
7
#include <
dmlc/io.h
>
8
#include <string>
9
#include <tuple>
10
11
#include "
xgboost/base.h
"
12
13
namespace
xgboost
{
14
class
Json;
15
// a static class for handling version info
16
struct
Version
{
17
using
TripletT = std::tuple<XGBoostVersionT, XGBoostVersionT, XGBoostVersionT>;
18
static
const
TripletT kInvalid;
19
20
// Save/Load version info to JSON document
21
static
TripletT Load(
Json
const
& in);
22
static
void
Save(
Json
* out);
23
24
// Save/Load version info to dmlc::Stream
25
static
Version::TripletT Load(
dmlc::Stream
* fi);
26
static
void
Save(
dmlc::Stream
* fo);
27
28
static
std::string
String
(TripletT
const
& version);
29
static
TripletT Self();
30
31
static
bool
Same(TripletT
const
& triplet);
32
};
33
34
}
// namespace xgboost
35
#endif
// XGBOOST_COMMON_VERSION_H_
dmlc::Stream
interface of stream I/O for serialization
Definition
io.h:30
xgboost::JsonString
Definition
json.h:87
xgboost::Json
Data structure representing JSON format.
Definition
json.h:357
io.h
defines serializable interface of dmlc
base.h
Copyright 2015-2023 by XGBoost Contributors.
xgboost
namespace of xgboost
Definition
base.h:90
xgboost::Version
Definition
version.h:16
Generated on Mon Sep 15 2025 12:12:20 for Medial Code Documentation by
1.9.8