ACMX 2.136.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
acmxvk::input Namespace Reference

Namespaces

namespace  anonymous_namespace{input_validation.cpp}

Enumerations

enum class  StringKind {
  Argument , ConfigurationLine , Path , DisplayText ,
  Identifier , Token , StructuredValue , Url
}

Functions

bool read_bounded_line (std::istream &input, std::string &line, std::string_view context, std::size_t line_number, std::size_t maximum_bytes)
std::string truncate_utf8 (std::string_view value, std::size_t maximum_bytes, std::string_view suffix)
void validate_file_size (const std::filesystem::path &path, std::string_view context, std::uintmax_t maximum_bytes)
void validate_spirv_file (const std::filesystem::path &path, std::string_view context)
void validate_string (std::string_view value, StringKind kind, std::string_view context, bool allow_empty)
void validate_text_file (const std::filesystem::path &path, std::string_view context, std::uintmax_t maximum_bytes, std::size_t maximum_line_bytes)

Variables

constexpr std::size_t MAX_ARGUMENT_BYTES = 8192
constexpr std::size_t MAX_AUDIO_PLAYLIST_ENTRIES = 4096
constexpr std::uintmax_t MAX_CONFIGURATION_FILE_BYTES = 4U * 1024U * 1024U
constexpr std::size_t MAX_CONFIGURATION_LINE_BYTES = 4096
constexpr std::size_t MAX_DISPLAY_TEXT_BYTES = 1024
constexpr std::size_t MAX_IDENTIFIER_BYTES = 64
constexpr std::size_t MAX_MIDI_MAPPINGS = 4096
constexpr std::size_t MAX_PATH_BYTES = 4096
constexpr std::size_t MAX_PLAYLIST_ENTRIES = 16384
constexpr std::size_t MAX_PLAYLIST_NODES = 1024
constexpr std::size_t MAX_SHADER_ENTRIES = 16384
constexpr std::size_t MAX_STRUCTURED_VALUE_BYTES = 4096
constexpr std::size_t MAX_TOKEN_BYTES = 128

Enumeration Type Documentation

◆ StringKind

enum class acmxvk::input::StringKind
strong
Enumerator
Argument 
ConfigurationLine 
Path 
DisplayText 
Identifier 
Token 
StructuredValue 
Url 

Definition at line 13 of file input_validation.hpp.

Function Documentation

◆ read_bounded_line()

bool acmxvk::input::read_bounded_line ( std::istream & input,
std::string & line,
std::string_view context,
std::size_t line_number,
std::size_t maximum_bytes )
nodiscard

◆ truncate_utf8()

std::string acmxvk::input::truncate_utf8 ( std::string_view value,
std::size_t maximum_bytes,
std::string_view suffix )
nodiscard

Definition at line 299 of file input_validation.cpp.

References truncate_utf8().

Referenced by acmxvk::MainWindow::clipOverlayText(), main(), and truncate_utf8().

◆ validate_file_size()

◆ validate_spirv_file()

void acmxvk::input::validate_spirv_file ( const std::filesystem::path & path,
std::string_view context )

◆ validate_string()

void acmxvk::input::validate_string ( std::string_view value,
StringKind kind,
std::string_view context,
bool allow_empty )

◆ validate_text_file()

void acmxvk::input::validate_text_file ( const std::filesystem::path & path,
std::string_view context,
std::uintmax_t maximum_bytes,
std::size_t maximum_line_bytes )

Variable Documentation

◆ MAX_ARGUMENT_BYTES

std::size_t acmxvk::input::MAX_ARGUMENT_BYTES = 8192
constexpr

◆ MAX_AUDIO_PLAYLIST_ENTRIES

std::size_t acmxvk::input::MAX_AUDIO_PLAYLIST_ENTRIES = 4096
constexpr

◆ MAX_CONFIGURATION_FILE_BYTES

std::uintmax_t acmxvk::input::MAX_CONFIGURATION_FILE_BYTES = 4U * 1024U * 1024U
constexpr

Definition at line 31 of file input_validation.hpp.

◆ MAX_CONFIGURATION_LINE_BYTES

std::size_t acmxvk::input::MAX_CONFIGURATION_LINE_BYTES = 4096
constexpr

◆ MAX_DISPLAY_TEXT_BYTES

std::size_t acmxvk::input::MAX_DISPLAY_TEXT_BYTES = 1024
constexpr

◆ MAX_IDENTIFIER_BYTES

std::size_t acmxvk::input::MAX_IDENTIFIER_BYTES = 64
constexpr

◆ MAX_MIDI_MAPPINGS

std::size_t acmxvk::input::MAX_MIDI_MAPPINGS = 4096
constexpr

Definition at line 35 of file input_validation.hpp.

Referenced by acmxvk::midi::load_mapping_file().

◆ MAX_PATH_BYTES

std::size_t acmxvk::input::MAX_PATH_BYTES = 4096
constexpr

◆ MAX_PLAYLIST_ENTRIES

std::size_t acmxvk::input::MAX_PLAYLIST_ENTRIES = 16384
constexpr

Definition at line 34 of file input_validation.hpp.

Referenced by acmxvk::load_playlist().

◆ MAX_PLAYLIST_NODES

std::size_t acmxvk::input::MAX_PLAYLIST_NODES = 1024
constexpr

Definition at line 33 of file input_validation.hpp.

Referenced by acmxvk::load_playlist().

◆ MAX_SHADER_ENTRIES

std::size_t acmxvk::input::MAX_SHADER_ENTRIES = 16384
constexpr

Definition at line 32 of file input_validation.hpp.

Referenced by acmxvk::loadShaderManifest(), and acmxvk::parseOptions().

◆ MAX_STRUCTURED_VALUE_BYTES

std::size_t acmxvk::input::MAX_STRUCTURED_VALUE_BYTES = 4096
constexpr

◆ MAX_TOKEN_BYTES

std::size_t acmxvk::input::MAX_TOKEN_BYTES = 128
constexpr