Subscribe to this list via RSS Blog posts tagged in Generics

Posted by on in Blogs
Using C++ Templates to Write Functions and Classes C++ Templates : Blueprints for Generic Classes and Functions C++ Templates are a powerful feature within the C++ language that extends your capabilities within C++.  Templates are a foundation of generic programming that lets you reuse your source code if you have multiple data types that you wish to pass instead of function overloading or rewrites. Why use templates? To avoid repeating code. Not bound to certain types Code can be easier to look at Increased flexibility Better tha...
How to get the array using the TJSONIterator Delphi[JAPAN] In this case json.  //// {"int_array":[5,10,15,20],"string_array":["日本語","한글","English"]} To get an array, you can use TJSONArray. I will introduce a case using an TJsonTextReader and TJSONIterator. We will create methods using generics.  It is because we want to support the Integer and String.
Object Pascal "Mind Your Language!" Dev Direct webinar source code The fourth season of Embarcadero EMEA "Developer Direct ONLINE!" webinars is half way! There are still three more episodes to go, 30 minutes every second Friday at 11am Amsterdam (10am UK) time. With every webinar we have more attendees and you can still register at embt.co/embtdd4 Today I had a pleasure of talking about some of the cool Object Pascal programming language features that were introduced in recent Delphi versions, including: Type helpers for primitive and custom types Gene...

Posted by on in Blogs
This is the last day… In this office. I’ve been in the same physical office for nearly 15 years. After years of accumulation, it now looks positively barren. Beginning next Monday, March 29th, 2010, I’ll be in a new building, new location, and new office. The good thing is that the new place is a mere stone’s throw from the current one. It will be great to leave all the Borland ghosts behind....

Posted by on in Blogs
Comparing C#, C++, and Delphi (Win32) Generics C#, C++, and Delphi all have a generic type and method language feature. Although all three languages are statically typed, they implement generics in very different ways. I'm going to give a brief overview of the differences, both in terms of language features and implementation. I presume that Delphi Prism generics work essentially the same as C# generics, which, as you’ll see, is different than Delphi/Win32 generics. Let me say at the outset that although all three systems work somewhat di...
Delphi Prism and DataSnap Server Method Stream Parameters This post is about using Delphi Prism to pass streams to/from DataSnap server methods.  The sample client that goes along with this post is available here: http://cc.embarcadero.com/item/26874. This client has the same functionality as the Delphi client described in this post: DataSnap Server Method Stream Parameters.  Here is a screen shot of the two clients running against the same Delphi sample server.Download the Delphi sample server (and Delphi sample client) here: http://cc.cod...

Posted by on in Blogs
DataSnap Server Method Stream Parameters This is a continuation of my posts on DataSnap server method parameters and return types.  This post is about  TStream and TDBXStreamValue.    The sample client and server projects that go with this post can be downloaded here: http://cc.embarcadero.com/item/26854 See my earlier posts on “Basic” and “Basic DBXValue” types.   I’ve yet to post about TDBXConnection, TDBXConnectionValue, TDBXReader, TParams, and TDataSet.  However, TDataSet is demonstrated in the sample projects. Basic Ba...

Posted by on in Blogs
Call DataSnap Server Methods with Delphi Prism This post provides information about calling DataSnap server methods from Delphi Prism clients. There are two new samples that go along with this post: http://cc.embarcadero.com/item/26806 and http://cc.embarcadero.com/item/26805 The first sample is a Delphi Prism client that demonstrates "Basic" types.  This client has nearly the same functionality as the Delphi client described in this post: DataSnap Server Methods Parameters.  The difference is that the Delphi Prism client isn’t a...

Posted by on in Blogs
DataSnap Server Method DBXValue Parameters This post provides more information about DataSnap server method parameters and return types. This is my second post on this subject, following DataSnap Server Method Parameters. The previous post was about "Basic" types. This post is about "Basic DBXValue" types.  The sample client and client and server projects that go with this post can be downloaded here: http://cc.embarcadero.com/item/26734 Basic Basic DBXValue Collection Connection AnsiString Boolean Currency TDat...

Posted by on in Blogs
DataSnap Server Methods Parameters Delphi 2009 introduced support for DataSnap server methods. If you are not familiar with this feature, here are two articles that describe server methods: DataSnap 2009 Overview , Getting Started with Delphi DataSnap 2009. DataSnap server methods support a variety of parameter and return types. The following list shows the types grouped into my own categories.  This post is about "Basic" types.  The sample client and server projects that go with this post can be downloaded here: http://cc....

Check out more tips and tricks in this development video: