33#include <NDEVR/Vector.h>
34#include <NDEVR/Bounds.h>
35#include <NDEVR/NumberParser.h>
36#include <NDEVR/BufferBase.h>
37#include <NDEVR/Buffer.h>
41#pragma warning( disable : 4661)
50 typedef PrimitiveAlignedBuffer<
StringView,
sizeof(
char*) == 4 ? 8 : 16> StringViewBuffer;
252 template<
class t_type>
377 template<u
int01 t_dims,
class t_type>
389 for (
uint01 dim = 1; dim < t_dims; ++dim)
407 for (
uint01 dim = 0; dim < t_dims; ++dim)
409 value[dim] = NumberParser::parse<t_type>(iter, &iter);
410 for (; iter < end; iter++)
418 for (; dim < t_dims; ++dim)
420 value[dim] = Constant<t_type>::Invalid;
430 for (
uint01 dim = 0; dim < t_dims; ++dim)
432 if (parts.size() > dim)
434 t_type val = value[dim];
439 value[dim] = Constant<t_type>::Invalid;
457 template<u
int01 t_dims,
class t_type>
481 if (parts.size() < 2)
505 template<u
int01 t_dims,
class t_type,
class t_vector_type>
540 template<u
int01 t_dims,
class t_type,
class t_vector_type>
575 template<
class t_type,
class t_memory_manager>
586 for (
uint04 i = 0; i < value.size(); i++)
600 value.setSize(strings.size());
601 for (
uint04 i = 0; i < value.size(); i++)
638 template<
class t_type, u
int01 t_row_dims, u
int01 t_col_dims>
649 for (
uint01 col = 0; col < t_col_dims; ++col)
652 for (
uint01 row = 1; row < t_row_dims; ++row)
669 for (
uint01 col = 0; col < t_col_dims; ++col)
671 if (col < columns.size())
674 for (
uint01 row = 0; row < t_row_dims; ++row)
676 if (row < rows.size())
679 value[col][row] = Constant<t_type>::Invalid;
684 for (
uint01 row = 0; row < t_row_dims; ++row)
686 value[col][row] = Constant<t_type>::Invalid;
700 template class NDEVR_BASE_API StringStream<bool>;
701 template class NDEVR_BASE_API StringStream<char>;
702 template class NDEVR_BASE_API StringStream<wchar>;
703 template class NDEVR_BASE_API StringStream<sint01>;
704 template class NDEVR_BASE_API StringStream<sint02>;
705 template class NDEVR_BASE_API StringStream<sint04>;
706 template class NDEVR_BASE_API StringStream<sint08>;
707 template class NDEVR_BASE_API StringStream<uint01>;
708 template class NDEVR_BASE_API StringStream<uint02>;
709 template class NDEVR_BASE_API StringStream<uint04>;
710 template class NDEVR_BASE_API StringStream<uint08>;
711 template class NDEVR_BASE_API StringStream<fltp04>;
712 template class NDEVR_BASE_API StringStream<fltp08>;
714 template class NDEVR_BASE_API StringStream<BitReference>;
716 template class NDEVR_BASE_API StringStream<InterpolationValues>;
718 template class NDEVR_BASE_API StringStream<char const*>;
719 template class NDEVR_BASE_API StringStream<char*>;
720 template class NDEVR_BASE_API StringStream<wchar const*>;
721 template class NDEVR_BASE_API StringStream<wchar*>;
723 template class NDEVR_BASE_API StringStream<BitFlag>;
725 template class NDEVR_BASE_API StringStream<Font>;
727 template class NDEVR_BASE_API StringStream<RGBColor>;
729 template class NDEVR_BASE_API StringStream<ACIColor>;
731 template class NDEVR_BASE_API StringStream<XYZColor>;
733 template class NDEVR_BASE_API StringStream<LABColor>;
735 template class NDEVR_BASE_API StringStream<HSLColor>;
737 template class NDEVR_BASE_API StringStream<HSBColor>;
739 template class NDEVR_BASE_API StringStream<Time>;
741 template class NDEVR_BASE_API StringStream<TimeSpan>;
743 template class NDEVR_BASE_API StringStream<UUID>;
744 template<
class t_type>
746 template class NDEVR_BASE_API StringStream<Angle<sint04>>;
747 template class NDEVR_BASE_API StringStream<Angle<fltp08>>;
749 template class NDEVR_BASE_API StringStream<File>;
750 class TranslatedString;
751 template class NDEVR_BASE_API StringStream<TranslatedString>;
753 template class NDEVR_BASE_API StringStream<std::string>;
754 template class NDEVR_BASE_API StringStream<std::wstring>;
A specification of upper and lower bounds in N-dimensions.
The equivelent of std::vector but with a bit more control.
Templated logic for doing matrix multiplication.
This class is like a string view, but may optionally store the data internally Useful if the return t...
Logic for splitting a string into two.
static StringViewBuffer split(const StringView &s, char split)
Splits a string into parts using the given delimiter character.
static const char * begin(const StringView &s)
Returns a pointer to the beginning of the string data.
static const char * end(const StringView &s)
Returns a pointer to the end of the string data.
static const char * getValidRegex()
Returns a regex pattern that validates Bounds input.
static void toString(const Bounds< t_dims, t_type > &value, StringAllocatingView &string)
Converts a Bounds to a string with min and max vectors separated by '^'.
static void fromString(const StringView &string, Bounds< t_dims, t_type > &value)
Parses a Bounds from a '^'-separated string of min and max vectors.
static void toString(const Buffer< t_type, t_memory_manager > &value, StringAllocatingView &string)
Converts a Buffer to a string by concatenating the string form of each element.
static const char * getValidRegex()
Returns a regex pattern that validates Buffer input.
static void fromString(const StringView &string, Buffer< t_type, t_memory_manager > &value)
Parses a Buffer from a comma-separated string, populating each element.
static void toString(const Matrix< t_type, t_row_dims, t_col_dims > &value, StringAllocatingView &string)
Converts a Matrix to a string with ',' separating row values and ';' separating columns.
static void fromString(const StringView &string, Matrix< t_type, t_row_dims, t_col_dims > &value)
Parses a Matrix from a string with ';'-separated columns and ','-separated row values.
static const char * getValidRegex()
Returns a regex pattern that validates Matrix input.
static void fromString(const StringView &string, Ray< t_dims, t_type, t_vector_type > &value)
Parses a Ray from a string by delegating to its vector type.
static void toString(const Ray< t_dims, t_type, t_vector_type > &value, StringAllocatingView &string)
Converts a Ray to its string representation by delegating to its vector type.
static const char * getValidRegex()
Returns a regex pattern that validates Ray input.
static const char * getValidRegex()
Returns a regex pattern that validates StringAllocatingView input.
static void toDisplayString(const StringAllocatingView &value, TranslatedString &string)
Converts a StringAllocatingView to a user-facing translated string.
static void fromString(const StringView &string, StringAllocatingView &value)
Parses a StringAllocatingView from a string view.
static void toString(const StringAllocatingView &value, StringAllocatingView &string)
Converts a StringAllocatingView to its string representation.
static void toDisplayString(const StringView &value, TranslatedString &string)
Converts a StringView to a user-facing translated string.
static void toString(const StringView &value, StringAllocatingView &string)
Converts a StringView to its string representation.
static const char * getValidRegex()
Returns a regex pattern that validates StringView input.
static void fromString(const StringView &string, StringView &value)
Parses a StringView from another string view.
static void toString(const String &value, StringAllocatingView &string)
Converts a String to its string representation.
static void fromString(const StringView &string, String &value)
Parses a String from a string view.
static const char * getValidRegex()
Returns a regex pattern that validates String input.
static void toDisplayString(const String &value, TranslatedString &string)
Converts a String to a user-facing translated string.
static const char * getValidRegex()
Returns a regex pattern that validates Vector input.
static void fromString(const StringView &string, Vector< t_dims, t_type > &value)
Parses a Vector from a comma-separated string representation.
static void toString(const Vector< t_dims, t_type > &value, StringAllocatingView &string)
Converts a Vector to a comma-separated string representation.
static void fromString(const StringView &string, Vertex< t_dims, t_type, t_vector_type > &value)
Parses a Vertex from a string by delegating to its vector type.
static const char * getValidRegex()
Returns a regex pattern that validates Vertex input.
static void toString(const Vertex< t_dims, t_type, t_vector_type > &value, StringAllocatingView &string)
Converts a Vertex to its string representation by delegating to its vector type.
Logic for reading or writing to a string or a user friendly, TranslatedString.
static void fromString(const StringView &string, t_type &value)
Logic for converting an object from an NDEVR API String allowing it to be used automatically with get...
static const char * getValidRegex()
Optionally specified to allow the software to do a check on user or file input to ensure that fromStr...
static void toDisplayString(const t_type &value, TranslatedString &string)
Logic for converting an object to an NDEVR API translated, user facing string.
static void toString(const t_type &value, StringAllocatingView &string)
Logic for converting an object to an NDEVR API String allowing it to be used automatically with the S...
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Logic for creating a regex for a given type of data.
static const char * ValidRegex(const TypeInfo &info)
Returns a valid regex string for the given type info.
Stores information about a type, relevant for certain templated functions.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
A point in N-dimensional space, used primarily for spatial location information.
The primary namespace for the NDEVR SDK.
@ BitFlag
Per-vertex bit flags (selected, hidden, etc.).
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
InterpolationValues
Values that represent interpolation functions.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Information about the object.