Questions tagged [wrapper]
A wrapper is an OOP technique where an object encapsulates (wraps) another object, hiding/protecting the object and controlling all access to it.
146
questions
3
votes
0
answers
92
views
Rust ffi wrapper for barcode scanning library
I'm the maintainer of the zxing-cpp library, a barcode image processing library written in C++. I recently decided to invest in a Rust wrapper library/crate that is now on crates.io. It is basically a ...
3
votes
1
answer
62
views
RandomNumber wrapper in Lua
This is a wrapper I wrote for math.random(). I have a larger program that will create a JSON file to 'load' from when I want to resume. However my program heavily ...
3
votes
0
answers
179
views
Simple Network Time Server in C++ with improvements from prior code analysis
From code review: OO simple network time server with changes from a previous code inspection and added Windows support
I made many changes as per the review comments. The code has been significantly ...
5
votes
1
answer
488
views
OO simple network time server with changes from a previous code inspection and added Windows support
I put up my SNTP Server code for review here:
SNTPv4 server based on rfc 4330 in C++
a fortnight ago and since then I have made changes as per code review comments and also added support for Windows, ...
6
votes
1
answer
183
views
SNTPv4 server based on rfc 4330 in C++
Please review my SNTPv4 server based on rfc 4330
I tested running 3 instances of ntp-check.exe from Galleon systems and 1 instance of Microsoft w32tm - w32tm /stripchart /computer:
No crash!
This is a ...
1
vote
0
answers
71
views
Using a decorator for init in Python3+Pyside6, to avoid writing boilerplate code [closed]
I'm building a GUI application with Python3+Pyside6 and have many QDialog classes that are similar, and i was looking for a way to avoid having to rewrite the same ...
4
votes
3
answers
529
views
Auctionsite API Wrapper in Python
This is the first API wrapper I've written and I'm wondering what I can do to improve. I've read through the feedback of a few similar posts
Readme
Code
...
1
vote
1
answer
108
views
Class that wraps a collection and tracks if its elements were visited
The VisitedCollection is a collection wrapper for setting and tracking if elements were visited (removed in terms of the wrapper)
I have concerns regarding:
should ...
9
votes
1
answer
1k
views
Porting C-style socket to CPP class
I am porting the C-style socket to design a simple wrapper around the telnet client in CPP. The telnet protocol is accomplished by using libtelnet in C. The C-style code for this wrapper is reviewed ...
4
votes
4
answers
491
views
Functions in PHP to run basic MySQL crud
I wrote a list of functions in PHP that I want to use in my pet project as an autoloaded file for all parts of the app. The purpose of these function is to shorten the code you write for MySQL queries ...
2
votes
1
answer
284
views
The receive function for telnet client
This is a follow up question to Send and receive functions for telnet client.
I am designing a simple wrapper around the telnet client using libtelnet for text-based communication to a telnet server. ...
0
votes
1
answer
331
views
Common interface for fixed-length and variable-length lists in C#
I am working on library project in which I am reading and writing binary files that have own file format structure. In that structure there are variable-length and fixed-length elements. My approach ...
0
votes
1
answer
200
views
C++20 Wrapper class for an unsigned integer type and a templated derived class that codes modular arithmetic type
The context is a library to represent numbers (in this case integers) by wheighted position by radix powers for every radix R, passed as template argument. These derived types are digits of radix R, ...
1
vote
0
answers
38
views
Wrap an ssh2 connection neatly and pass commands
I want to structure this better but don't think I'm handling results well. I'm used to python and I think my flow is way off. Is this bad design?
Should my results be Result<String, Error>?
I'm ...
0
votes
1
answer
117
views
Data Wrapper Class with Automatic Saving and Locked Read/Write Accessors
This is a wrapper for a synchronized data structure that:
Saves periodically
Keeps track of dirty flag automatically (set when a write access is requested)
Maintains a lock on data
Only allows access ...