473,503 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any Generic ET framework?

Ben
Hi,

I was writing a expression template for string concatenation latetly.

When writing it, I started to feel curious that why there's not any
generic et lib that can save me from wring each different et lib from
scratch. Or, maybe I was just ignorant and there is some already?

matrix, string, array, vector, whatever, the idea of et is quite
similar. We need a leaf node and a binary non-leaf node for expressing
the expression syntax tree; We need to overload some operators; We
need to broadcast certain functor object recursively to all leaf
nodes, etc.
And there can be many generic tasks that are not specific to matrix or
string at all. (say, find out how many leaf nodes in the tree, or find
out the type of or reference to the #i leaf node, etc.)

And we shouldn't be writing such kind of code over and over again for
different things that we want to make lazy, should we?

So, I started writing my own generic et framework. And using this
framework, I have created my string concatenation for string, const
char*, const char[k], CString. They can even be mixed.
Each different type just needs to specialize a few classes to use this
framework.

Code using this framework can look like:
string str = "world";
CString cstr = "...";
string s = et + "hello" + " " + str + cstr + "!";
But before I start writing my next et, (I'm thinking about using it to
apply MCM algorithm for matrixes), I want to make sure that I'm not
doing anything that has been done well in another lib.

So, the question is: is there anything out there that has already does
so?

Can I simply customize an existing generic et lib to optimize my
string concatenation for string, CString, MyString etc?
Ben.
Jul 22 '05 #1
4 1684

"Ben" <be****@combined.com> wrote in message
news:24**************************@posting.google.c om...
Hi,

I was writing a expression template for string concatenation latetly.
When writing it, I started to feel curious that why there's not any
generic et lib that can save me from wring each different et lib from scratch. Or, maybe I was just ignorant and there is some already?


There is Daixtrose: http://daixtrose.sourceforge.net/.

I can't say whether it is any good, but you might want to check it
out. Markus Werle has talked about submitting it to boost.

Jonathan
Jul 22 '05 #2
On 5 Jul 2004 23:26:33 -0700, be****@combined.com (Ben) wrote:
Hi,

I was writing a expression template for string concatenation latetly.

When writing it, I started to feel curious that why there's not any
generic et lib that can save me from wring each different et lib from
scratch. Or, maybe I was just ignorant and there is some already?


There are several of them!

http://daixtrose.sourceforge.net/ (which sounds like a sugar)

This was the first one I think, from many years back:
http://acts.nersc.gov/pete/ (which sounds like a mate down the pub)

Tom
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Jul 22 '05 #3
Ben wrote:
Hi,

I was writing a expression template for string concatenation latetly.

When writing it, I started to feel curious that why there's not any
generic et lib that can save me from wring each different et lib from
scratch. Or, maybe I was just ignorant and there is some already? What is ET an abbreviation for?

[snip]
But before I start writing my next et, (I'm thinking about using it to
apply MCM algorithm for matrixes), I want to make sure that I'm not
doing anything that has been done well in another lib. What is MCM?

[snip]


Ben.


When posting to an international newsgroup that has a wide audience,
please either refrain from the abbreviations or define them before
you use them, such as:
I need help with Binary Tree Search (BTS) algorithm....

Don't assume any knowledge, except standard C++, from your
target audience in this newsgroup.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #4
Ben
>
When posting to an international newsgroup that has a wide audience,
please either refrain from the abbreviations or define them before
you use them, such as:
I need help with Binary Tree Search (BTS) algorithm....

Don't assume any knowledge, except standard C++, from your
target audience in this newsgroup.

Sorry for that.
ET stands for "expression template".

MCM stands for "Matrix-chain multiplication". I was trying to give the
full name for this, it is just that I forgot the full name when
posting. :->
Jul 22 '05 #5

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

Similar topics

2
9149
by: Jon Davis | last post by:
The garbage handler in the .NET framework is handy. When objects fall out of scope, they are automatically destroyed, and the programmer doesn't have to worry about deallocating the memory space...
17
3290
by: Andreas Huber | last post by:
What follows is a discussion of my experience with .NET generics & the ..NET framework (as implemented in the Visual Studio 2005 Beta 1), which leads to questions as to why certain things are the...
5
2791
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
15
5300
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
0
5918
by: crazyone | last post by:
I've got a gaming framework i'm building and i want to save myself the trouble of reading and writting the complete game data to a custom file and load/save it to an XML file but i'm getting...
1
3888
by: raylopez99 | last post by:
I seem to get name collision between the Generic collection SortedList and C++.NET Framework collection SortedList. How to resolve? Here are the libraries that seem to clash:...
5
11107
by: Torben Laursen | last post by:
I am writing a COM in C# using visual studio 2005 and VSTO. Inside the code I use some support classes that are generic but they are not used in the inferface of the COM. However I still get a...
9
5829
by: Steve Richter | last post by:
in a generic class, can I code the class so that I can call a static method of the generic class T? In the ConvertFrom method of the generic TypeConvert class I want to write, I have a call to...
3
9482
by: Taurin | last post by:
I have a method that I would like to be able to pass a generic list (such as List<string>, List<int>, etc). I'm trying to figure out what would be the best type of parameter to use to pass in the...
0
7194
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,...
0
7070
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...
0
7267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
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...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5566
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,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1495
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 ...
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.