Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Variable Objects ( VObjects )

Author
Message
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 11th May 2013 22:11 Edited at: 14th Jun 2013 08:48
==== Description ====

Since I started programing with dark basic it always bothered me that you can't have
propper classes and objects as parameters and so on. So recently I tried to get something
together to compensate a little bit for this lack of features.

What I came up with are "VObjects". Variable objects.

==== VObject ( vo ) ====

The basic idea is to have objects with variable attributes so they can serve different
purposes. The attributes support all the datatypes dbp can handle.
Integer, Double Integer, Float, Double Float, String, Word, DWord, Byte
Also a Variant Datatype I implemented.

Attributes of a vo can be read via index, name or first/next.

==== Variant ====

In the context of my vobject system I implemented a variant datatype that supports
all the components of this system including filtering and sorting.
Regarding the sorting: Not all aspects of the variant are tested yet.

The variant supports all datatypes dbp can handle:
Integer, Double Integer, Float, Double Float, String, Word, DWord, Byte

Variants values can be get and set via the default functions.

==== VObject List ( vol ) ====

VObjects can be filtered and sorted in lists.

Filtering

Max Filter Statements per List: 254

Syntax: [Datatype][Attribute][Operator][Value or Attribute]
Operators:


Examples:


Sorting

Max Sorter Statements per List: 254

Syntax: [Sorttype][Attribute] | [Attribute][Sorttype]
Examples:

Code examples:


==== Object Monitoring ====

With the help of shared memory I was able to create an external application that can stream over
the objects created in the vobject system. It should work with all applications that use my
vobject system. Well, at least as long as there are no changes made with the shared memory values.

I will rework this feature and use a network connection instead of shared memory.

==== Concept ====

The different objects:


I'm doing all the operations directly inside the memory ... so don't expect the use of types here.
This turned out to be pretty efficiently and fast.

The Text values for VObjects are stored outside of the object so I can have fixed values for the string values inside of the VObjects.
Text values with the same Text share the same vot in memory.
When strings are involved I'm not comparing the strings but the memory that holds them.

==== Other examples ====

Simple start of a button-management for a gui.
This isn't optimized but working! Runs with ~3000 FPS for me.

requires: D3D Funcs
Get available resolutions


==== Functions ====
VObject ( vo )

VObject Text ( vot )

VObject Attribute ( voa )

VObject List ( vol )

VObject Filter ( vof )

VObject Sorter ( vos )

VObject Shared Memory ( vosm )

VObject Shared Memory GUI ( vosm_gui )

Common


==== Issues ====
- No known issues atm.

==== TO DO ====
- Feature: Save/Load vo, vol, complete execution.
- Feature: Parent/Child behaviour of vo obects.
- Remove vos and vof objects from vol object.
- More Power! More performance is always good.

==== Changelog ====
1.02


1.01


1.0


==== Downloads ====
- 1.02 Download The monitor application doesn't seem to work with this anymore XD. However, as I said: I will rework this feature anyways.
- 1.01 Download Monitor Source Compiled Monitor
- 1.0 Download
Requirements:
- Matrix1Utils
Monitor requirements:
- BBB Gui Plugin

==== Donate ====
If you like what I did here I would appreciate a little donation.
thenerd
10
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 12th May 2013 20:07
It looks like you've created a better version of a system I was working on I did the same thing in my system, but I used strings to store every data type because I didn't know enough about using memory. I'm interested in using this

Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 12th May 2013 20:28 Edited at: 12th May 2013 21:10
I'm still working on the List object ... resolved some ugly problems today XD.
Also I implemented a possibility to catch simple commands. Now I can set the List Filter to '@All' to have it list all vobjects.
( Maybe I'll upload an updated version later )
I'm currently implementing the other datatypes into the List Filter.

Then I had the idea to implement a possibility to also sort the list. Shouldn't be to hard to handle.
Something like "asc var1;desc var2".
-> This would sort the list by var1, and by var2 where var1 attributes have the same value.
"asc Item;asc SubItem;asc Value"
-> Every next level sorts the items of the same value from the above level.
I'm not yet sure how I will do this XD ... but I bet there's an easy trick to get this working.
Maybe a recursive function will do the trick ... so I can just sort one level at a time.

However, I still have to make a performance analysis of the List Refreshing in combination with large amounts of vobjects.

Also I need to change the behaviour of auto-refreshed lists XD.
Currently they are refreshing every time a vobject is created.
But I think I will rather set them in a "dirty" state and refresh them once if they are about to be used.

Btw.: Did you run the code?
Which results did you get?
Phaelax
DBPro Master
16
Years of Service
Recently Online
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th May 2013 22:26 Edited at: 12th May 2013 22:33
So basically, I create a vobject then I can assign various pairs of key-values to it? Or is it doing something else?


Many years ago, before you joined the forums, someone made a precompiler for DB that allowed objects like you'd expect in OOP. I'm not sure whatever happened to it.

Found it.
http://forum.thegamecreators.com/?m=forum_view&t=100985&b=8

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 12th May 2013 22:38
Well, you can categorize and ( probably later sort them ) via lists and cycle through the list via getfirstvobject, getnextvobject ...

Other than that ... no the basic purpose is to create objects with dynamic attributes. Or in other words attributes that aren't known on compile time.

I reworked the Filter Parser and it's working out pretty good this time. Definitely an improvement.
Phaelax
DBPro Master
16
Years of Service
Recently Online
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th May 2013 22:41
Quote: "Other than that ... no the basic purpose is to create objects with dynamic attributes. Or in other words attributes that aren't known on compile time."

My immediate thought of using this is to build XML elements. If I was to ever expand my XML library to write files as well, this would be very handy.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 12th May 2013 23:49
Actually I was thinking about parent and child behaviour. But if anything I will add it later.
thenerd
10
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 13th May 2013 00:14 Edited at: 13th May 2013 00:17
Here's a request for a feature - some way to save the entire list of VObjects and later load that file. This could be useful in games because the engine could manage every entity using your VObjects system. By being able to save and load this data, it would make it easy to create a saving / loading system, which could serve as a level format as well. With this system, I could parse through every entity and do a check to see if its object has been loaded. If not, I load the object. If the object is loaded, then the engine will proceed with whatever other code that object has.

[edit] also - I downloaded and ran your code, works very well and the demo runs about 700 fps with about the same values/ms you have. I haven't tried to use it in my engine yet but it seems to be working very well.

Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 13th May 2013 08:03 Edited at: 13th May 2013 09:49
The List Object now supports all the dbp datatypes for List Filtering (except string).

Also the new Filter Parser can handle all of these reliably:



In the end the trick was pretty lame XD.
Well I bet there are still some statements that can crash the process XD.

However, there is one thing that bothers me:
I'm using "VAL" to convert the Filter Value from string to the various different datatypes, but apparently "VAL" only returns a float.
Does anybody know if this is indeed just a normal float? XD
Because then it would fail for double float, double integer, maybe even dword. Basically every value exceeding the range of a float.

EDIT: Well, ok ... the Filter still works correctly even with exaggerated statements like that:
"double integer %test = 2147483648000000"
I guess that's good enough for now XD.

EDIT2: I just realized ... the creation of vobjects still takes too much time. I need 16 seconds to create 10000 VObjects, one test value each. That's way too long. But then again 10000 are many objects. XD
However I can filter them in a list in 62ms. That's not bad, but could still need some more performance.
So for now it's a bad idea to repeatedly create and delete objects.

EDIT3: I attached the new source code with the new filter parser.
Autorefresh doesn't seem to work anymore right now XD. I'm not quite sure though XD.

Notice: I definitely will rework the filter parser a bit more.
I want to merge the process into one function so I need to do as few string functions as possible.

Regarding the VObject creation: I guess I could lower the time it takes to create them if I implement the buffer I was talking about earlier.
Currently I'm increasing the objects every time I append a value. So the object is recreated in memory in a different size.
For VObjects -> Every time an attribute is added.
For VObject Lists -> Every time the Filter is changed or an vobject is added to the list.

EDIT4: I managed to increase the speed when creating objects:
From 10000 objects in ~16 seconds to 10000 in ~3.8 seconds.
Phaelax
DBPro Master
16
Years of Service
Recently Online
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th May 2013 10:39
Quote: "The List Object now supports all the dbp datatypes for List Filtering (except string)."

For storing strings, can you create the string but instead of hashing that as the value, hash the pointer to the string?

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 13th May 2013 11:20 Edited at: 15th May 2013 01:41
In some situations that's possible but for functions I call directly with a String I need another solution.
For example: Integer = vobject_get_attrintegers(vo, "Width")

I'm actually more comfortable with the memory comparison.
Because if anything happens with my Text System and the Strings aren't reused how they should the pointer method would fail immediately, the memory comparison would still work.

I updated the code some more and I could get a lot more performance this time .
I'm now able to create 10000 VObjects in ~86 ms, one attribute each, and list them with "@All" in ~8 ms.
If I filter them by one attribute ( "integer %test = 1" ) it takes ~45 ms.

The change I made:
I assumed that the code crashes if I compare memory that isn't properly allocated by my program.
So to make sure I only compare the memory I allocated I always needed two sizes when comparing string in memory to make sure the size I'm comparing doesn't exceed the memory sizes.
But actually I noticed it doesn't seem to matter which memory I'm comparing.
It seems like I just shouldn't read or write without checking first.

Getting awesomer .

EDIT2:
The VObject buffer works.
They start with a size of 256 byte each and have plenty of space for attributes.
It takes 25 integer attributes to exceed the size. XD
If the size is exceeded it's increased by 64 bytes.

I can now create 1.000.000 VObjects, with one integer attribute each, in ~10 seconds. I don't know if this is fast enough XD.

I'm gonna do the same to the VObject List now.

EDIT3:
The VObject List buffer is working.
I'm not sure yet how to configure it, but I guess I will let the lists have their own buffer values.
Some lists are meant to hold many objects while others only hold a few.

Current Times:
- Create 1.000.000 VObjects, one integer attribute each - ~5,7 seconds.
- Filter them in a List - ~917 ms.
- Cycle through List via getfirst, getnext - 96 ms.

Using a more likely count of 1500:
- Create 1.500 VObjects, one integer attribute each - 6 ms.
- Filter them in a List - 6 ms.
- Cycle through List via getfirst, getnext - 0 ms.

Using 10.000:
- Create - 54 ms.
- Filter - 11 ms.
- Cycle - 1 ms.

-> Attachment update



EDIT4:
String filtering is working, but far from perfect XD.
I got a nasty problem I just can't figure out.
Well, you shouldn't filter by string anyways.
It's bad practice, jeez.

-> Attachment update

EDIT5:
I reworked big parts of my string handling and now the string filtering is working perfect.

And it works pretty fast too.

Latest Stats :

10.000 VObjects, 3 attributes: String, Double Integer, Integer
Create - 60 ms
Filter via string - 11 ms
Filter via integer - 10 ms
Cycle - 1 ms

100.000 VObjects, 3 attributes: String, Double Integer, Integer
Create - 529 ms
Filter via string - 73 ms
Filter via integer - 65 ms
Cycle - 10 ms

1.000.000 VObjects, 3 attributes: String, Double Integer, Integer
Create - ~7,6s
Filter via string - 1043 ms
Filter via integer - 937 ms
Cycle - 92 ms

-> Attachment update

EDIT6:
Next thing I'm gonna do is clean everything up and fix my datatypes.
I used many integers but that was actually a bad choice in many cases XD.
I should have paid attention to it earlier .
Duffer
16
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 18th May 2013 11:41
@ Grasmann - this looks like it could come in v handy...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 18th May 2013 18:25 Edited at: 18th May 2013 22:28
Yesterday I restarted the project and began to rework it from scratch XD ... there where to many things I haven't really thought of early enough.

This time I'll create more different objects in memory and just link them.
These are currently planned:
- vo ( vobject )
- vot ( vobject text )
- voa ( vobject attribute )
- vof ( vobject filter )
- vos ( vobject sort )
- vol ( vobject list )
Before vof, vos and vol would have been combined, which leads to many calculations and loop-countings when searching for specific ptr adresses inside an object and that of course decreases the performance.

If I split up the objects like this I also have less problems when changing values ( of attributes for example ).

However, probably the most important thing is: This time I'll choose fitting datatypes right from the start XD.
For example: The Attr Count of a vo was an integer value before, now it's a word value, which means a vo can have up to 65.535 attributes now, instead of 2.147.483.647 XD.
I even doubt that anybody would ever use 65.535 attributes XD.
I thought about using a byte here, but depending on what you are doing 255 attributes may not be enough. >_>
Well, actually you have to substract 1 everywhere because my indexes start with 1 now.

I already finished my work on vot and I'm working on vo right now.
Currently I can create 10.000 vot objects in 19 ms.
Creating 1.000.000 vo objects, one integer attribute each, takes ~3,5s.

Question:
I was thinking about a variant datatype inside of my system.
But actually I'm not sure how helpful that would be :/.
What do you think?

EDIT:
I got all the datatypes for attributes running again:
Latest Speed test:
Creating 10.000 vo objects, 8 attributes each ( every datatype ) in 224 ms.

The way I structured it this time it's really nice to program with
Here's a small piece of code:

Feels kind of object oriented already

EDIT2:
I actually implemented the variant now. Wasn't as much work as I thought.
However the helpfulness is a bit limited since you will have to create it with this function XD:

The function to set the value will probably look similar.
Another thing is that variants will probably never be very performant XD, but that's quite typical.

For variants the value parameters will be checked from left to right. The first parameter <> "", 0 or 0.0 decides the datatype of the variant. So if two parameters are used the secound will be ignored.

When retrieving the value from a variant attribute the normal functions are used. If the datatype doesn't match a NULL value will silently be given back.
Example:

Now I could probably implement a setting to have the variant return for example an existing float value if a double float value was requested.
But actually I think that's not how it should work XD.
The variants should provide the possibility to store different datatypes but the user should still keep in mind what is in there.
I will provide a functions to get the variant datatype.

-> I attached the current version
The code is much cleaner and more compact this time .
Current Features:
- Create vo objects
- Add attributes to vo objects ( all datatypes + variant )
- Read values of attributes ( all datatypes + variant )

I'm gonna double-check everything now and comment and stuff.
Then I will add the funtions to set attribute values.
After that I will start to work on the vol, vof and vos objects for the Lists.

The vot object is pretty stable as far as I can tell, so this time I actually think I can filter by comparing the linked vot objects, which will probably give the list-filtering a significant boost.
So I guess it won't be a problem to have lists autoupdate all the time, although I will probably still use a dirty-flag to signalize the system to update it as soon as it is used.
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 20th May 2013 05:15 Edited at: 21st May 2013 16:05
Update

I got the filtering running again.
All datatypes are supported even the variants are working.

Filter syntax:
Syntax: [Datatype][Attribute][Operator][Value/Attribute]
Notice: The "%" before an attribute name isn't needed anymore.

Examples:


If the value provided in the filter statement is a string value the vo object will be checked for an attribute with that name.
If the vo object doesn't have an attribute of that name it's treated as a string value.

These are also working:


Tolerance:
These are valid statements.


Operators:


The vol ( VObject List ) object is really stable this time.
A list can have up to 254 filter statements and 254 sorter statements.

Sorting isn't working yet, that's the next thing I'm gonna do.

Btw.: I forgot to create the functions to set attribute values XD.
So they aren't included this time.

Latest Speed Test:
- Create 10.000 vo objects, 9 attributes each ( every datatype + variant ) ~273 ms
- Filter them via float variant 24 ms
- Delete everything 21 ms

EDIT:
- Updated the first post, removed some of the outdated information and pictures.
- Removed all old versions of the snippet.

EDIT2:
Omg I thought the sorting would be easier to get done.
But actually I underestimated the fact that this needs to be a multi-level sorting for different datatypes. XD
I don't know if I can get this working.

-> Attached the latest version
Changes:
- Filtering via attribute comparison working ( only integer right now )

The above filter would compare attribute "width" with attribute "height".
If attribute height isn't existing within the object it won't be listed.


EDIT3:
-> Attached latest version
Changes:
- Filtering via attribute comparison is now working with all datatypes including variants

EDIT4:
-> Attached latest version
Changes:
- Added functions to read attributes via name. ( see example below; example below is included in the latest source code )

Simple example:
Get available resolutions


EDIT5:
Sorting:
I just now discovered the excellent array sorting by IanM .
And I actually got a concept for my multi-dimensional sorting feature right now.
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 21st May 2013 21:37 Edited at: 21st May 2013 21:53
Update

The sorting probably was the hardest part until now XD.
But I got it working and actually I'm pretty glad how it worked out.

In the end I could resolve all my problems with a recursive sort algorithm.
The key right now is to only sort the entries in the next sort-level if there are identical values within the values of the current sort-level.
Actually it's pretty easy if I think about it right now XD.

The sorting is created in a way to support up to 254 sort-levels, but actually I doubt that anybody will ever use them all XD.
You can sort via all datatypes, including strings and my variants.

Sorter syntax:
[Sorttype][Attribute] | [Attribute][Sorttype]

Examples:


Notice:
I haven't really tested everything regarding variants yet.

Simple example:
Create a bunch of vo objects and sort them by 3 attributes. ( this example is included in the latest source code )


Result of the example code:


-> Attached latest version

Latest Speed test:
Sorting 10.000 vo objects by 3 attributes ~44 ms.
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 22nd May 2013 00:33 Edited at: 22nd May 2013 00:52
Update
- Added functions to set attribute values.
- Standard functions are also working for variants.
- Autosort and Autorefresh for VObject List are working now.
- Updated the first post to resemble latest version.

-> Attached latest version

EDIT: I'm gonna call the latest version 1.0.

Attachments

Login to view attachments
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd May 2013 07:21
Wow very nice work...

Well done, this progressed quick and well

Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 22nd May 2013 08:31 Edited at: 24th May 2013 03:27
Thx although I still think I probably should have created this in wip XD. Are there even mods around here? XD

Ah well, I just remembered there's still the saving and loading I could implement.
Saving single vo or complete vol with filters, sorters and vo list.

Oh and there is another potential feature: Parent/Child behaviour.

I'll see what I can do about that stuff.

EDIT:
I got a nice idea for the import/export feature.
I will design it for multiple export/import types right from the start and create a shared memory export.

The export via shared memory would work like this:

Just like the standard export with files the objects are transformed into a recreatable form.
But instead of writing them to a file I will write them to a chunk of shared memory ( the commands are even similar ).
When finished the program will go into a mini-loop waiting for another process to pick up the shared data.
After the processing of the data this other program writes a value into the first few bytes of the shared memory to signalize the main program to continue.
That way I could create an external tool to monitor the objects.

I guess I could even let the monitor app "request" a memory share via a value in the memory.
So you could start your application and if anything isn't working as it should you could just start the monitor app and have it request and list all objects automatically.
I think that sounds uber-nice .

EDIT2:
I focused my work on the monitor application for now.
It's actually working.
I can now request and list vo, voa and vot objects in an external monitor app.
It currently looks like this:


EDIT3:
Latest look of monitor application:

Left top corner: Request types ( Execution streams all objects to the monitor app )
Below: vol list
Right: vo list
The gui doesn't have any functionality yet.
Also I removed a bug where the creation of lists could lead to a crash.

EDIT4:

-> Attached latest version 1.01
Changes:

Attachments

Login to view attachments
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 24th May 2013 03:31 Edited at: 24th May 2013 03:31
-> Attached monitor application source code 1.01

The source code is mostly the same as the normal one, but has some additional functions.

Attachments

Login to view attachments
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 24th May 2013 03:35 Edited at: 14th Jun 2013 08:09
-> Attached compiled monitor.exe

This is the compiled version of the monitor source code.
( Sorry for all the posts XD ... but it feels awkward to attach the files to random posts in here XD )

The gui of the monitor application actually works already.
I haven't fully tested everything but it seems to work well.

Things that work in the gui:
- Make a request ( there is only request 'Execution' right now, which streams over all objects )
- Select a vol in the left list -> updates vo list right of it
- vo objects are listed with their attributes

Notice: The monitor application only works with code compiled from version 1.01 and above.

EDIT:
I took kind of a forced break from development XD.
I will probably continue to develop this while creating something with it. So, I will fill in the
functionality I find missing while I'm actively using it.
I probably won't add the feature to remove vobject attributes, since you can always just alter the value
of the attribute.
Also I want to ensure that the "get_nth"-functionality is always working how the user is/I am expecting.

The monitor-feature is basically working, although version 1.01 still has an issue where big vobject
lists will crash the process, because the shared buffer isn't big enough.
However, I will probably redisign this feature and use an network connection to local host instead of
shared memory, because this will open the door to network-monitoring of applications.
I have Servers and other things in mind here.
For now this feature doesn't have a high priority for me in development. It's a nice to have.

New Functions in the next version (1.02):
VObject ( vo )

VObject List ( vol )

VObject Attribute ( voa )

VObject Text ( vot )

VObject List ( vol )

VObject Filter ( vof )

VObject Sorter ( vos )

The resonance isn't really big enough for me to release a lot of small updates. XD
So, I will wait until I feel like I should release an updated version, or if
somebody asks for it.

Bugfixes in next version (1.02):

- Fixed memory leak in filter process.
When repeatedly filtering vobject lists they got bigger and bigger XD.
This is actually a major bug, so I will probably release an updated version today.

- Fixed an error where autofilter and autosort could lead to an infinite loop, crashing the application.
I think I just recently "implemented" this error XD, so the released version 1.01 shouldn't be affected by this.

- Fixed the bug that crashed the deinit process, which I couldn't find for so long.
Turns out I'm an idiot and read a dword value from memory instead of a byte value in the voa delete process.

Attachments

Login to view attachments
Grasmann
10
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 14th Jun 2013 08:24 Edited at: 1st Aug 2013 22:31
Update to v1.02

- Added several functions to set standard attributes of the different objects.
- Fixed memory leak iin filter process.
- Fixed infinite loop in autofilter/sort process.
- Fixed crash in deinit process.

The monitor application doesn't seem to work with this anymore.
To be honest I haven't looked into it for quite some time now and I'm not exactly sure why doesn't work anymore XD.
But I want to rework this feature anyways so I don't really care right now XD.

EDIT:
I'll probably target the Save/Load feature next.

However, I would like to know: Does anybody actually use/test this?
I know there are quite some functions that can be confusing at first and I don't provide a help file at all.
Do the examples in the first post help with that?
I don't know. XD
A little feedback would help.

EDIT2:
I decided to implement a new "VObject Save Load ( vosl )" object in the code.
The object will provide the functionality to save and load.

For now I have planned:
- Save/Load lists of VObject ( vo ) Names.
This will include all attributes of the listed vobjects.

- Save/Load lists of VObject List ( vol ) Names and their VObjects ( vo ).
This will include all vobjects listed in any of the vobject lists in the namelist.

- Save/Load Execution. ( To create a data package of some sort )
This will include all vobject lists and all vobjects the system has loaded to that point.


This will be much easier to handle as a full object rather than some single functions.
And I can use links between the objects in memory much easier this way.

EDIT3:
I already started my work on the save/load function.
But I'm thinking about using the same operations for network functions as well as network monitoring.
The idea is to have a central streaming that can stream performant commands to players as well as stream objects or whole lists to files, another application or a server.
So the server would be able to send a VObject List ( vol ) containing the players as VObjects ( vo ) or something like that.
For now I paused my work on it and did some other stuff with the object system.

EDIT4:
Although I previously said I won't provide functions to delete attributes, because it would make the system inconsistent, I'm currently
coding them. So there will probably come some more of them on the list above. I already have a pretty efficient function to delete the
entries ( vo ) in a vol.

EDIT5:
I implemented an option into the object system that allows attributes that get set but don't exist to be created with the given value.
Also I added some more function variants for string handling to be able to handle them more intuitive.

New functions in next version (1.03):
VObject ( vo )

VObject Text ( vot )

VObject Attribute ( voa )

VObject List ( vol )

Common


EDIT6:
I was in hospital for the last 1,5 weeks XD ... so I couldn't do anything in that time. But I will probably continue with this in the next few days.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-04-24 01:52:05
Your offset time is: 2019-04-24 01:52:05