mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
includes: Switch over to import statements (#224)
* Update includes and patterns to new import system * Update namespaces to new syntax
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/math.pat>
|
||||
import std.io;
|
||||
import std.math;
|
||||
|
||||
/*!
|
||||
Types used to change the base of the displayed integer value.
|
||||
Used like `type::Hex<u32> hexNumber;`, `type::Oct<u16> octalNumber;`
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Integer type representing a Hexadecimal value. Displays its value in hexadecimal format.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include <std/io.pat>
|
||||
#include <std/string.pat>
|
||||
#include <std/mem.pat>
|
||||
import std.io;
|
||||
import std.string;
|
||||
import std.mem;
|
||||
|
||||
/*!
|
||||
Type representing a Base64 encoded string
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Type representing a Base64 encoded string
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
import std.io;
|
||||
|
||||
/*!
|
||||
Type to decode a BCD (Binary Coded Decimal) number
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Decodes a BCD value where one byte represents a single digit
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
import std.io;
|
||||
|
||||
/*!
|
||||
Types to display single bytes using various different representations
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Type visualizing the value of each individual bit
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/core.pat>
|
||||
import std.io;
|
||||
import std.core;
|
||||
|
||||
/*!
|
||||
Types representing RGB or RGBA colors. The decoded color will be displayed in their color field
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Type representing a generic RGBA color with a variable number of bits for each color
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/math.pat>
|
||||
#include <std/mem.pat>
|
||||
import std.io;
|
||||
import std.math;
|
||||
import std.mem;
|
||||
|
||||
/*!
|
||||
Type representing a 16 bit half precision floating point number
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Type representing a 16 bit half precision floating point number
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
import std.io;
|
||||
|
||||
/*!
|
||||
Types to deal with UUIDs (Universally Unique Identifiers) / GUIDs (Globally Unique Identifiers) as described in RFC 4122
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Type representing a GUID value
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/string.pat>
|
||||
import std.io;
|
||||
import std.string;
|
||||
|
||||
/*!
|
||||
Types used to decode IP addresses
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
A 4 byte IPv4 Address as described in RFC 791
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/mem.pat>
|
||||
import std.io;
|
||||
import std.mem;
|
||||
|
||||
/*!
|
||||
Types used to decode Little Endian Base 128 numbers used to store large numbers as space efficiently as possible
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Base LEB128 type. Use `uLEB128` and `sLEB128` instead.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
import std.io;
|
||||
|
||||
/*!
|
||||
Types used to decode MAC Addresses
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
A MAC Address as used in the Internet Protocol
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include <std/string.pat>
|
||||
#include <std/sys.pat>
|
||||
#include <std/io.pat>
|
||||
#include <std/ctype.pat>
|
||||
import std.string;
|
||||
import std.sys;
|
||||
import std.io;
|
||||
import std.ctype;
|
||||
|
||||
/*!
|
||||
Types used to parse and enforce specific magic numbers
|
||||
*/
|
||||
|
||||
namespace type
|
||||
namespace auto type
|
||||
{
|
||||
fn fm(ref auto value)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include <std/mem.pat>
|
||||
import std.mem;
|
||||
|
||||
/*!
|
||||
Types dealing with various kinds of resource paths
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
Type representing a single path segment. Use the `Path` type instead of using this on its own
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include <std/io.pat>
|
||||
import std.io;
|
||||
|
||||
/*!
|
||||
Types used to pretty print size values
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
A generic size type which displays its value in Bytes (or kiB, MiB, GiB, TiB, PiB, EiB if larger)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/time.pat>
|
||||
import std.io;
|
||||
import std.time;
|
||||
|
||||
/*!
|
||||
Types used to decode various different time formats
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
namespace auto type {
|
||||
|
||||
/**
|
||||
A 32 bit Unix time value
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
// namespace auto type {
|
||||
|
||||
// using char = s8;
|
||||
using byte = s8;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
// namespace auto type {
|
||||
|
||||
using uint8_t = u8;
|
||||
using uint16_t = u16;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
// namespace auto type {
|
||||
|
||||
using le16 = le u16;
|
||||
using be16 = be u16;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
// namespace auto type {
|
||||
|
||||
// using u8 = u8;
|
||||
// using u16 = u16;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
// namespace auto type {
|
||||
|
||||
using BYTE = u8;
|
||||
using WORD = u16;
|
||||
|
||||
Reference in New Issue
Block a user