473,722 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for C++ implementations of a particular pattern

Greetings,

I am looking for C++ implementations of a pattern similar to the
following description. This pattern is a wrapper of sorts (in the
general sense, not like a Decorator) for a single arithmetic value. In
the base class of this pattern, instances can be multiplied, added,
compared, copied, and generally treated just like any other arithmetic
value EXCEPT that the value of such instances cannot be directly
assigned nor accessed. Only through classes derived from this base
class can values be directly assigned or accessed. This may sound like
a strange class design but it meets the requirements for certain
problems.

If anyone knows of a publicly available implementation (posted on the
net, described in a book, etc.) written in C++ that fits the
description above, please post it here.

Thanks,
Eric.

Jul 23 '05 #1
4 1331
I found this googling..
http://ex-code.com/propcpp/PR-short.html
If that value is an object.. Wouldn't that meet you requirement???

<er**@lemings.c om> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Greetings,

I am looking for C++ implementations of a pattern similar to the
following description. This pattern is a wrapper of sorts (in the
general sense, not like a Decorator) for a single arithmetic value. In
the base class of this pattern, instances can be multiplied, added,
compared, copied, and generally treated just like any other arithmetic
value EXCEPT that the value of such instances cannot be directly
assigned nor accessed. Only through classes derived from this base
class can values be directly assigned or accessed. This may sound like
a strange class design but it meets the requirements for certain
problems.

If anyone knows of a publicly available implementation (posted on the
net, described in a book, etc.) written in C++ that fits the
description above, please post it here.

Thanks,
Eric.

Jul 23 '05 #2
Not really. I'm looking for a pattern where "getting and setting" the
value is delegated to derived classes and all other operations are
inherited from the base class. This library appears to be more akin to
the Observer pattern for syncronizing and updating state changes.

Jul 23 '05 #3
what about protected constructor and virtual methods, will it do?
Base classing is a bitch heh.
Edernity
---------
if it help
please help me provide better school supplies for childrenof indonesia.
it may be a donation but I merely ask you to letme send email to you
from one of the product of I'm affiliated and please register there on
mechant account free. If you even want you refund back on your dollar
of i-kard, its ok, I'll send you just use regular delivery on shipping
please. Please note this is very safe since this is a bonafid company.
remember your credit card company will confirm you on your purchase.
Still have doubts, sign on a personal account and let me contact you
again on it. just one mail pls
also
I'm also affiliated to this site:www.getaportal.com/portals/edd
y_ruslim

Jul 23 '05 #4
I mean like a class Integerteger
constructor protected
operator virtual
for the state changes and synch won't it depends on how u use those
threads and how messages passes between them
NewClass use the derived Integerteger?
hope it help. sol (smile out loud)
hey how about the donation. cost u zilch!
Edernity
---------
if it help
please help me provide better school supplies for childrenof indonesia.
it may be a donation but I merely ask you to letme send email to you
from one of the product of I'm affiliated and please register there on
mechant account free. If you even want you refund back on your dollar
of i-kard, its ok, I'll send you just use regular delivery on shipping
please. Please note this is very safe since this is a bonafid company.
remember your credit card company will confirm you on your purchase.
Still have doubts, sign on a personal account and let me contact you
again on it. just one mail pls
also
I'm also affiliated to this site:
www.getaportal.com/portals/eddy_ruslim
Unless u wanto e-gold it at 1369872
New to egold:www.e-gold.com/e-gold.asp?cid=1369872
NAH, previous way cost u zilch

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
7967
by: Matt | last post by:
Hello, I'm a hiring C++ developer employer looking for existing, online C++ aptitude tests. I have not yet extensively researched this yet, but as an example, I thought this test looked pretty good: http://expertrating.com/c++test.asp
3
1626
by: Steve | last post by:
Hi, I just know there must be some kind of well-known design pattern here, but I'll be damned if I can find it... Let me explain my situation. I have a hierarchy of classes for a GUI. All derived from class 'Primitive'. Fine so far.
28
2741
by: John McCabe | last post by:
Hi I'm looking for something equivalent to the Data Structures and Algorithms in Ada 95 books by Biedler and Feldman etc, but based towards efficient C++ implementations. Does anyone know of such a thing and could recommend one? I'm particularly interested in coverage of binary search trees, especially Red-Black, Splay and AVL, as well as hashing tables and
4
1585
by: Jéjé | last post by:
Hi, I have a file which contain 1 pair of values by line like: Name1=Value1 = I nned to store these pair of values in a sortedlist. So the result expected for the 2 samples lines is: Key Value Name1 Value1
17
1987
by: ToddLMorgan | last post by:
I'm just starting out with python, after having a long history with Java. I was wondering if there were any resources or tips from anyone out there in Python-land that can help me make the transition as successfully as possible? Perhaps you've made the transition yourself or just have experience with folks who have made the transition. I'm looking for the common types of mistakes that say a Java/C# or even C++ developer may commonly...
2
1393
by: mathieu | last post by:
Hello there, I am looking for the proper structure for the following problem. I would like to read in memory a file that has the following structure: k1, v1 k2, v2 k3, v3 k4 / k1, v11
67
9901
by: lcw1964 | last post by:
This may be in the category of bush-league rudimentary, but I am quite perplexed on this and diligent Googling has not provided me with a clear straight answer--perhaps I don't know how to ask the quesion. I have begun to familiarize myself here with the gcc compiler in a win32 environment, in the form of MinGW using both Dev C++ and MSYS as interfaces. I have recompiled some old math code that uses long double types throughout and...
0
1157
by: krzysztof.konopko | last post by:
I know that the informations I provide may seem limited but maybe someone has solved similar problem. I am new in design patterns and I am quite confused who should control whom, how to configure particular elements checkers, how to make it all flexible and elegant, how to encapsulate it as much as possible. There is an API which provide a sequence of data objects. My task is to check if this sequence is correct: - does it have proper...
13
1358
by: Bilz | last post by:
Hello, I am looking for a good pattern. I have a rather large software app that makes use of a service manager for its many services... configuration, colors, data lookup, units, etc. Up until now the service manager has been a singleton and anyone who wants access to a service just asks the singleton. Now we have a new requirement... run multiple instances of the software in the same application space with different configurations.
0
8863
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9238
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9157
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.