-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconvert.h
More file actions
93 lines (79 loc) · 8.06 KB
/
Copy pathconvert.h
File metadata and controls
93 lines (79 loc) · 8.06 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
╔════════════════════════════════════════════════════════════════════════════════╗
║ SMART DATA CONVERTER v2.0 ║
║ HEADER DECLARATIONS ║
╠════════════════════════════════════════════════════════════════════════════════╣
║ ║
║ 📋 PURPOSE: Function declarations and interface definitions for ║
║ Smart Data Converter application ║
║ ║
║ 🔧 FEATURES: ║
║ • Menu display function declarations ║
║ • Number system conversion function prototypes ║
║ • Data unit conversion function declarations ║
║ • Utility function prototypes ║
║ • Cross-platform compatibility definitions ║
║ ║
║ 📁 FILE: convert.h ║
║ 🔗 IMPLEMENTATION: convert.cpp, SmallUnits.cpp ║
║ 👨💻 AUTHOR: Amr Saadawy ║
║ 📧 CONTACT: amr.sa3dwy.53a51a343@linkedin.com ║
║ 🌐 GITHUB: github.com/Amr4924 ║
║ 📱 TIKTOK: @3mr675 ║
║ ║
║ 📅 CREATED: 2025 ║
║ 🔄 VERSION: 2.0 ║
║ 📜 LICENSE: Open Source ║
║ ║
╚════════════════════════════════════════════════════════════════════════════════╝
*/
#ifndef CONVERT_H
#define CONVERT_H
#include <vector>
#include <string>
// ═══════════════════════════════════════════════════════════════════════════════
// MENU DISPLAY FUNCTIONS
// ═══════════════════════════════════════════════════════════════════════════════
void welcome(); // Main welcome screen display
void list(std::vector<std::string> lis); // Generic list display utility
void Menu(std::vector<std::string> lis); // Generic menu display
void MenuUnits(std::vector<std::string> MU); // Unit selection menu
void MenuConvert(std::vector<std::string> MC); // Conversion options menu
// ═══════════════════════════════════════════════════════════════════════════════
// NUMBER SYSTEM CONVERSION FUNCTIONS
// ═══════════════════════════════════════════════════════════════════════════════
void DecimalToBinary(int decimal); // Convert decimal to binary
int BinaryToDecimal(std::string binary); // Convert binary to decimal
// ═══════════════════════════════════════════════════════════════════════════════
// MATHEMATICAL UTILITIES
// ═══════════════════════════════════════════════════════════════════════════════
double powr(double num, double power); // Custom power calculation
double units(double num, int power); // Unit conversion calculator
double smallunits(double num, int power); // Small unit conversion calculator
// ═══════════════════════════════════════════════════════════════════════════════
// LARGE TO SMALL UNIT CONVERSIONS
// ═══════════════════════════════════════════════════════════════════════════════
void Yottabytes(int ch); // YB to smaller units
void Zettabyte(int ch); // ZB to smaller units
void Exabyte(int ch); // EB to smaller units
void Petabyte(int ch); // PB to smaller units
void Terabyte(int ch); // TB to smaller units
void Gigabyte(int ch); // GB to smaller units
void Megabyte(int ch); // MB to smaller units
void Kilobyte(int ch); // KB to smaller units
// ═══════════════════════════════════════════════════════════════════════════════
// SMALL TO LARGE UNIT CONVERSIONS
// ═══════════════════════════════════════════════════════════════════════════════
void kilobyte(int pic); // KB to larger units
void megabyte(int pic); // MB to larger units
void gigabyte(int pic); // GB to larger units
void terabyte(int pic); // TB to larger units
void petabyte(int pic); // PB to larger units
void exabyte(int pic); // EB to larger units
void zettabyte(int pic); // ZB to larger units
// ═══════════════════════════════════════════════════════════════════════════════
// UTILITY FUNCTIONS
// ═══════════════════════════════════════════════════════════════════════════════
void input(std::string unit, std::string convert, std::string nameUnit, int powr); // Generic input handler
void ads(); // Developer contact links
#endif // CONVERT_H