Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6111577a8 |
@@ -85,7 +85,8 @@
|
||||
F69AB77A2B16D210000115BC /* VType_of.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = VType_of.hpp; sourceTree = "<group>"; };
|
||||
F69AB77E2B16D8CE000115BC /* VType_of.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = VType_of.cpp; sourceTree = "<group>"; };
|
||||
F6BF9BE22E3901E3002E6AF0 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
F6FC229E284F73DA00A6381D /* Notes.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Notes.txt; sourceTree = "<group>"; };
|
||||
F6CD527B2F5B1E5A00EFCF67 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
|
||||
F6CD527C2F5B1E6900EFCF67 /* ReadMe.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ReadMe.md; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -120,12 +121,14 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F608AAB828271CFE005C276B /* Frameworks */,
|
||||
F6BF9BE22E3901E3002E6AF0 /* Makefile */,
|
||||
F608AB6D2827F3CE005C276B /* Makefile.def */,
|
||||
F608AB6E2827F3CE005C276B /* Makefile.project */,
|
||||
F608A98D2826B791005C276B /* Products */,
|
||||
F608AAAF28270AA8005C276B /* tests */,
|
||||
F61D7C3F2E381655002A1AED /* tjp */,
|
||||
F6CD527B2F5B1E5A00EFCF67 /* LICENSE */,
|
||||
F6BF9BE22E3901E3002E6AF0 /* Makefile */,
|
||||
F608AB6D2827F3CE005C276B /* Makefile.def */,
|
||||
F608AB6E2827F3CE005C276B /* Makefile.project */,
|
||||
F6CD527C2F5B1E6900EFCF67 /* ReadMe.md */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -151,26 +154,16 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F61F9BED2C6E4CEC00F79137 /* _tests */,
|
||||
F6FC229E284F73DA00A6381D /* Notes.txt */,
|
||||
F608AA722826BCD8005C276B /* ConcreteVariant.h */,
|
||||
F608AA6E2826BCD8005C276B /* ConcreteVariant.hpp */,
|
||||
F608AA762826BCD8005C276B /* ConcreteVariant+IO.h */,
|
||||
F608AA732826BCD8005C276B /* VType.cpp */,
|
||||
F680BDB3285645BA00044A4F /* VType.inl */,
|
||||
F608AA792826BCD8005C276B /* VType.h */,
|
||||
F608AA702826BCD8005C276B /* VType.hpp */,
|
||||
F69AB77A2B16D210000115BC /* VType_of.hpp */,
|
||||
F608ABA128284A65005C276B /* VType+Functional.hpp */,
|
||||
F608AA712826BCD8005C276B /* VType+IO.h */,
|
||||
F666630628679CAE00239768 /* VType+IO.cpp */,
|
||||
F680BDB628567BCF00044A4F /* VVector.h */,
|
||||
F608AA7A2826BCD8005C276B /* Variant.h */,
|
||||
F608ABA328285011005C276B /* Variant.hpp */,
|
||||
F608AA782826BCD8005C276B /* Variant+Dispatch.h */,
|
||||
F608AA6D2826BCD8005C276B /* Variant+Dispatch.inl */,
|
||||
F608ABA228284B6C005C276B /* Variant+Functional.hpp */,
|
||||
F62C2BDF2A5005A9007B43A3 /* Variant+Functional+Generate.hpp */,
|
||||
F69548BE2828930D005D1B64 /* Variant+Functional.cpp */,
|
||||
F62C2BDF2A5005A9007B43A3 /* Variant+Functional+Generate.hpp */,
|
||||
F608ABA028283CC7005C276B /* Variant+IO.hpp */,
|
||||
F608AB9328282DF3005C276B /* Variant+VariantFunctionalUsingMap.hpp */,
|
||||
F608AB9428282E40005C276B /* Variant+VariantFunctionalUsingMapAndVectorCache.hpp */,
|
||||
@@ -181,6 +174,15 @@
|
||||
F608AB9D28283866005C276B /* VariantSerialization.h */,
|
||||
F608AB9E2828387E005C276B /* VariantSerialization.hpp */,
|
||||
F608AA772826BCD8005C276B /* VariantSerialization+IO.hpp */,
|
||||
F608AA792826BCD8005C276B /* VType.h */,
|
||||
F608AA702826BCD8005C276B /* VType.hpp */,
|
||||
F608AA732826BCD8005C276B /* VType.cpp */,
|
||||
F680BDB3285645BA00044A4F /* VType.inl */,
|
||||
F69AB77A2B16D210000115BC /* VType_of.hpp */,
|
||||
F608ABA128284A65005C276B /* VType+Functional.hpp */,
|
||||
F608AA712826BCD8005C276B /* VType+IO.h */,
|
||||
F666630628679CAE00239768 /* VType+IO.cpp */,
|
||||
F680BDB628567BCF00044A4F /* VVector.h */,
|
||||
);
|
||||
path = variant;
|
||||
sourceTree = "<group>";
|
||||
|
||||
26
LICENSE
Normal file
26
LICENSE
Normal file
@@ -0,0 +1,26 @@
|
||||
MIT NON-AI License
|
||||
|
||||
Copyright (c) 2025, Timothy Prepscius
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
In addition, the following restrictions apply:
|
||||
|
||||
1. The Software and any modifications made to it may not be used for the purpose of training or improving machine learning algorithms,
|
||||
including but not limited to artificial intelligence, natural language processing, or data mining. This condition applies to any derivatives,
|
||||
modifications, or updates based on the Software code. Any usage of the Software in an AI-training dataset is considered a breach of this License.
|
||||
|
||||
2. The Software may not be included in any dataset used for training or improving machine learning algorithms,
|
||||
including but not limited to artificial intelligence, natural language processing, or data mining.
|
||||
|
||||
3. Any person or organization found to be in violation of these restrictions will be subject to legal action and may be held liable
|
||||
for any damages resulting from such use.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
7
ReadMe.md
Executable file
7
ReadMe.md
Executable file
@@ -0,0 +1,7 @@
|
||||
# Core_Variant
|
||||
|
||||
Variant classes that allow for serialization across platforms
|
||||
IDs are based on const expresssion non rtti type name.
|
||||
|
||||
TODO:
|
||||
* write examples
|
||||
@@ -1,4 +1,6 @@
|
||||
// TJP COPYRIGHT HEADER
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#define CATCH_CONFIG_RUNNER
|
||||
#include <tjp/core/testing/catch.hpp>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ConcreteVariant.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace tjp {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ConcreteVariant.h"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
When I redo VType
|
||||
|
||||
I want to make IOType to be 3 unsigned integers.
|
||||
type[0] is modifications, like, is it a vector
|
||||
type[1] is category, like 0 is intrinsics, 1 is core, 2, network, 3, crown, etc.
|
||||
type[2] is type, but with respect to category.
|
||||
|
||||
|
||||
VType is u64;
|
||||
|
||||
u32
|
||||
|
||||
struct {
|
||||
u8 nothing;
|
||||
u24 keyType;
|
||||
u24 valueType;
|
||||
u8 meta;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#include "VType+IO.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#include "VType.hpp"
|
||||
|
||||
namespace tjp {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <tjp/core/types/Types.h>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#include <tjp/core/debug/Debug.h>
|
||||
|
||||
namespace tjp {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Variant+IO.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
|
||||
template<typename T>
|
||||
Functions generateVariantFunctions ();
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#include "Variant+Functional.hpp"
|
||||
|
||||
namespace tjp {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Variant.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VariantIO.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
|
||||
// VariantFunctionalUsingMap implements the functional aspect of a variant,
|
||||
// using both a Map to look up the functions object.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
|
||||
// VariantFunctionalUsingMapAndVectorCache implements the functional aspect of a variant,
|
||||
// using both a Map lookup for complex types and a Vector cache for indexing into commonly used
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
|
||||
|
||||
// VariantFunctionalUsingSingleFunctionsObject implements the functional aspect of a variant
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
|
||||
|
||||
// VariantFunctionalUsingSingleFunctionsObject implements the functional aspect of a variant
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Variant+Functional.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Variant.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VariantIO.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace tjp {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VType.hpp"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VariantIO.hpp"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// TJP COPYRIGHT HEADER
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#include <tjp/core/variant/VType.hpp>
|
||||
#include <tjp/core/variant/VType_of.hpp>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// TJP COPYRIGHT HEADER
|
||||
// License: Modified MIT (NON-AI)
|
||||
// See the LICENSE file in the root directory for license information.
|
||||
// Copyright 2026 Timothy Prepscius
|
||||
|
||||
#include <tjp/core/string/String.h>
|
||||
#include <tjp/core/variant/Variant.hpp>
|
||||
|
||||
Reference in New Issue
Block a user