-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathIntXSettings.h
More file actions
54 lines (41 loc) · 1.3 KB
/
IntXSettings.h
File metadata and controls
54 lines (41 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#ifndef INTXSETTINGS_H
#define INTXSETTINGS_H
#include "../Utils/Enums.h"
#include "IntXGlobalSettings.h"
class IntXSettings
{
public:
// Creates new <see cref="IntXSettings" /> instance.
// <param name="globalSettings">IntX global settings to copy.</param>
IntXSettings(IntXGlobalSettings &globalSettings)
{
// Copy local settings from global ones
autoNormalize = globalSettings.getAutoNormalize();
toStringMode = globalSettings.getToStringMode();
} // end Constructor
// To string conversion mode used in this <see cref="IntX" /> instance.
ToStringMode getToStringMode() const
{
return toStringMode;
} // end function getToStringMode
// Set to value from <see cref="IntX.GlobalSettings" /> by default.
void setToStringMode(ToStringMode value)
{
toStringMode = value;
} // end function setToStringMode
// If true then each operation is ended with big integer normalization.
bool getAutoNormalize() const
{
return autoNormalize;
} // end function getAutoNormalize
// Set to value from <see cref="IntX.GlobalSettings" /> by default.
void setAutoNormalize(bool value)
{
autoNormalize = value;
} // end function setAutoNormalize
private:
ToStringMode toStringMode = ToStringMode::tsmFast;
bool autoNormalize = false;
}; // end class IntXSettings
#endif // !INTXSETTINGS_H