A small object manager

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
BlueShark
In need of some credit
In need of some credit
Posts: 2
Joined: Sun Jan 25, 2009 11:23 am

A small object manager

Post by BlueShark » Sun Jan 25, 2009 11:53 am

Hello,

I'm writing a small object manager and I need some help. I've added a couple of features but I think that there are some vital ones missing. Here is a short list:
already programmed
  • -writing and reading objects
    -handling the object index
    -moving objects
But here comes the long list:
my wish list^^
  • -writing wxString-objects
    -checking free harddrive space
    -checking file system
    -getting the current time and date and save in the file
    -using other classes for the class
How it works:
It's simple. You give the class object a path to a file and then you can easily pump objects into the class without looking after formatting the file. Later you can access the objects through an index function or sort the objects. I know that I should use a database for something like that but in my opinion that would be too much overhead.

Could you give me some hints on how I can improve my class?

I want to get rid of the input and output streams and use a stream which can do both at the same time like wxFileStream but like I said, I don't know how to write a wxString properly.
Attachments
Serializer.h
(5.64 KiB) Downloaded 93 times
(programming = fun) != (debugging = frustrating) => (solution = a hot cup of fine tea)

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Mon Jan 26, 2009 6:40 am

Hi have you tried wxSerialize? It might save you some effort in writing that yourself.

http://www.xs4all.nl/~jorgb/wb/MyProjec ... alize.html

Cross platform and supports many wx classes by default
With regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

catalin
Moderator
Moderator
Posts: 1521
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Post by catalin » Mon Jan 26, 2009 7:56 am

I also like wxSerialize - very simple, with a nice&easy version-ing option.

If you need a human readable format you could take a peak at wxJSON, or the JSON format in general.

BlueShark
In need of some credit
In need of some credit
Posts: 2
Joined: Sun Jan 25, 2009 11:23 am

Post by BlueShark » Mon Jan 26, 2009 2:54 pm

I am feeling a little bit.....don't know how to describe it. I actually searched for smth. like an serilization-class in wxWidgets but never found anything like it.

Thank you so much for that link. Now I only write a few methods an have done my whole work.

Mfg
BlueShark
(programming = fun) != (debugging = frustrating) => (solution = a hot cup of fine tea)

Post Reply