TsnTables2/Src/Tables.mqh

84 lines
2.5 KiB
MQL5
Raw Permalink Normal View History

2026-05-16 16:50:33 -05:00
//+------------------------------------------------------------------+
//| Tables.mqh |
//| Copyright 2026, Niquel Mendoza. |
//| https://www.mql5.com/es/users/nique_372 |
//+------------------------------------------------------------------+
2026-08-03 12:14:24 -05:00
#ifndef TSNPARSERIN_CPP_DLL
2026-05-16 16:50:33 -05:00
#property copyright "Copyright 2026, Niquel Mendoza."
#property link "https://www.mql5.com/es/users/nique_372"
#property strict
2026-08-03 12:14:24 -05:00
#endif // TSNPARSERIN_CPP_DLL
2026-05-16 16:50:33 -05:00
#ifndef TSNTABES_SRC_TABLES_MQH
#define TSNTABES_SRC_TABLES_MQH
2026-06-02 21:31:44 -05:00
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
#ifdef TSNPARSERIN_CPP_DLL // TSNPARSERIN_CPP_DLL
2026-08-03 12:14:24 -05:00
// Tipado para c++
#include <cstdint>
#endif // TSNPARSERIN_CPP_DLL
2026-05-16 16:50:33 -05:00
2026-06-02 21:31:44 -05:00
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
2026-05-16 16:50:33 -05:00
namespace TSN
{
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
union TsnBitInterprete
{
2026-08-28 22:40:39 -05:00
ulong ulong_value;
long long_value;
double double_value;
};
2026-05-16 16:50:33 -05:00
2026-08-29 12:54:36 -05:00
template <typename TValue>
union TsnValToBytes
{
uchar bytes[sizeof(TValue)];
TValue value;
};
2026-06-02 21:31:44 -05:00
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
#define IsDigit(c) ((c ^ '0') <= 9)
#define IsNotDigit(c) ((c ^ '0') > 9)
2026-06-18 20:08:12 -05:00
//--- Inf +
2026-08-03 12:14:24 -05:00
#define TSN_DBL_INF_LONG_BITS int64_t(0x7FF0000000000000)
2026-06-18 20:08:12 -05:00
//--- Inf -
2026-08-03 12:14:24 -05:00
#define TSN_DBL_INF_NEG_LONG_BITS int64_t(0xFFF0000000000000)
2026-06-18 20:08:12 -05:00
//--- Nan
2026-08-03 12:14:24 -05:00
#define TSN_DBL_NAN_LONG_BITS int64_t(0x7FFFFFFFFFFFFFFF)
2026-06-18 20:08:12 -05:00
2026-06-02 21:31:44 -05:00
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
2026-05-19 06:59:37 -05:00
//---
2026-08-03 12:14:24 -05:00
const uint8_t g_arr_table_true[4] =
2026-05-19 06:59:37 -05:00
{
't',
'r',
'u',
'e'
};
//---
2026-08-03 12:14:24 -05:00
const uint8_t g_arr_table_false[5] =
2026-05-19 06:59:37 -05:00
{
'f',
'a',
'l',
's',
'e'
};
2026-05-16 16:50:33 -05:00
}
//+------------------------------------------------------------------+
2026-05-19 06:59:37 -05:00
#endif // TSNTABES_SRC_TABLES_MQH