c++builder

Tool to parse C++ source and move in-header inline methods to the .cpp source file? [closed]

♀尐吖头ヾ 提交于 2019-11-30 18:46:43
The source code of our application is hundreds of thousands of line, thousands of files, and in places very old - the app was first written in 1995 or 1996. Over the past few years my team has greatly improved the quality of the source, but one issue remains that particularly bugs me: a lot of classes have a lot of methods fully defined in their header file. I have no problem with methods declared inline in a header in some cases - a struct's constructor, a simple method where inlining measurably makes it faster (we have some math functions like this), etc. But the liberal use of inlined

Easy way to tell if unicode character is supported in current font?

本小妞迷上赌 提交于 2019-11-30 10:03:39
I'm using Borland C++ Builder 2009 and I display the right and left pointing arrows like so: Button2->Hint = L"Ctrl+\u2190" ; Button3->Hint = L"Ctrl+\u2192" ; This works fine on Windows 7, the application uses font 'Segoe UI'. On XP I get a square instead of the arrows, I use font 'Tahoma' on XP. In other words mentioned Unicode characters are not present in Tahoma on XP. Is there an easy and fast way to simply check if the requested Unicode character is supported in the currently used font ? If so I could, for instance, replace the arrow with '>' or '<'. Not perfect, but good enough. I don't

How to parse a JSON array in RAd Studio?

折月煮酒 提交于 2019-11-30 07:43:13
I am trying to parse the following Json document: [ {"EventType":49,"Code":"234","EventDate":"20050202", "Result":1}, {"EventType":48,"Code":"0120","EventDate":"20130201", "Group":"g1"} ] I use the following code: TJSONObject* jsonread0 = (TJSONObject*) TJSONObject::ParseJSONValue(TEncoding::ASCII->GetBytes(Memo1->Lines->Text), 0); for(int i=0;i<jsonread0->Size();i++) { TJSONPair* pair = jsonread0->Get(i); At this point, pair.JsonValue is NULL. What do I need to do to read the values? You are not casting the JSON String properly, you must cast as an TJSONArray and then iterate over the

How can I generate continuous tones of varying frequencies?

大兔子大兔子 提交于 2019-11-30 07:27:59
I want to generate and play a continuous sound with specific frequencies and amplitudes that change over time. I don't want to have a delay between sounds. How can I do this with Delphi or C++ Builder? By using WaveAudio library it's possible to generate a continous cosinus wave. I was gonna post some code but I can't figure out how to do it properly so I won't. But all you need to do is use TLiveAudioPlayer and then override the OnData event. And also set Async to true if there is no message pump. This very simple example should get you started. program Project1; {$APPTYPE CONSOLE} uses

C++ Builder XE7 LME288 Error

假装没事ソ 提交于 2019-11-30 05:56:57
问题 Suddenly, out of the blue, I get the LME288 linker error. [ilink32 Warning] Warning: D:/Projects/TrainFever Game Manager/TFGM/Win32/Debug/TFGameManager.ilc: 0x00010000 / 0x08000000 [ilink32 Warning] Warning: D:/Projects/TrainFever Game Manager/TFGM/Win32/Debug/TFGameManager.ild: 0x00010000 / 0x08000000 [ilink32 Warning] Warning: D:/Projects/TrainFever Game Manager/TFGM/Win32/Debug/TFGameManager.ilf: 0x00010000 / 0x0a000000 [ilink32 Warning] Warning: D:/Projects/TrainFever Game Manager/TFGM

How do I debug a difficult-to-reproduce crash with no useful call stack?

孤街醉人 提交于 2019-11-30 03:35:57
I am encountering an odd crash in our software and I'm having a lot of trouble debugging it, and so I am seeking SO's advice on how to tackle it. The crash is an access violation reading a NULL pointer: First chance exception at $00CF0041. Exception class $C0000005 with message 'access violation at 0x00cf0041: read of address 0x00000000'. It only happens 'sometimes' - I haven't managed to figure out any rhyme or reason, yet, for when - and only in the main thread. When it occurs, the call stack contains one incorrect entry: For the main thread, which this is, it should show a large stack full

Tool to parse C++ source and move in-header inline methods to the .cpp source file? [closed]

自古美人都是妖i 提交于 2019-11-30 02:37:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . The source code of our application is hundreds of thousands of line, thousands of files, and in places very old - the app was first written in 1995 or 1996. Over the past few years my team has greatly improved the quality of the source, but one issue remains that particularly bugs me: a lot of classes have a lot

3D library recommendations for interactive spatial data visualisation?

£可爱£侵袭症+ 提交于 2019-11-29 21:01:51
Our software produces a lot of data that is georeferenced and recorded over time. We are considering ways to improve the visualisation, and showing the (processed) data in a 3D view, given it's georeferenced, seems a good idea. I am looking for SO's recommendations for what 3D libraries are best to use as a base when building these kind of visualisations in a Delphi- / C++Builder-based Windows application. I'll add a bounty when I can. The data Is recorded over time (hours to days) and is GPS-tagged. So, we have a lot of data following a path over time. Is spatial: it represents real 3D

Benchmarking affected by VCL

故事扮演 提交于 2019-11-29 15:37:49
Today I ported my old memory benchmark from Borland C++ builder 5.0 to BDS2006 Turbo C++ and found out weird thing. exe from BCB5 runs OK and stable exe from BDS2006 measure OK only before main Form is started (inside its constructor) and if the benchmark is started again after main form is Activated or even after any VCL component change (for example Caption of main form) then the speed of benchmark thread is strongly affected. After some research I found out that: Does not mater if test is inside thread or not. The process/thread priority,affinity does not affect this either. Hide of any

Late Binding COM objects with C++Builder

随声附和 提交于 2019-11-29 10:59:55
We're interfacing to some 3rd party COM objects from a C++Builder 2010 application. Currently we import the type library and generate component wrappers, and then are able to make method calls and access properties in a fairly natural way. object->myProperty = 42; object->doSomething(666); However, we've been bitten by changes to the COM object's interface (which is still being extended and developed) causing our own app to fail because some method GUIDs seem to get invalidated - even if the only change to the interface has been the addition of a new method). Late Binding has been suggested as