LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

An Experiment: From C Definitions To Templates

Posted 05-02-2015 at 09:22 PM by rainbowsally
Updated 05-03-2015 at 11:13 PM by rainbowsally (additions and corrections, description mod)

An Experiment: From C Definitions To Templates

This is a tangent, but a forgivable one, no?

Today's mind-blowing Mad Computer Science features:
  • An experiment morphing a regular old C style set of functions into a set of C++ templates.
  • We rename a literal parameter type to a template parameter T and voila!
  • This will help demystify the horrible noise in the messy STL templates by making a simple transition from main_1 to main_2, in which error messages from the compiler
...
Member
Posted in Uncategorized
Views 69 Comments 0 rainbowsally is offline
Old

The C/C++ Parser Generator (v. 2.x)-- Intro & Example 1 (ToCamelCase)

Posted 04-20-2015 at 06:42 PM by rainbowsally
Updated 05-04-2015 at 12:27 PM by rainbowsally (not enough sleep that day)

The C/C++ Parser Generator (v. 2.x)-- Intro & Example 1 (ToCamelCase)

Based loosely on the long defunct but exceedingly wonderful non-gnu BNF project at Savanah...

Today's Amazing Features
  • Character-wise parser with basic string (abbrev 'str') functions built-in.
  • Uses normal intuitive C/C++ boolean grammar, if(), while(), &&, ||, etc.
  • Powerful string translation and inline EXTERN( ... ) capability.
  • Funcs:
  • is_*()
  • not_*()
...
Member
Posted in Uncategorized
Views 154 Comments 0 rainbowsally is offline
Old

The C/C++ Parser Generator (v. 2.x) -- The Brains

Posted 04-20-2015 at 06:15 PM by rainbowsally
Updated 05-05-2015 at 02:34 AM by rainbowsally (bug fix, typo correction)

The C/C++ Parser Generator (v. 2.x) -- The Brains

Features:
  • How many times do I have to tell you, Igor?

See the version notes at the top of the source extractor below. Latest: Apr 23, 2015.

The code for this is just over the size limit here at linuxquestions last time I ran into it, so we have packed this stuff up.

Run this file as 'sh parser-files.base64'. You probably have the base64 app if you're running linux.

It creates:...
Member
Posted in Uncategorized
Views 157 Comments 0 rainbowsally is offline
Old

GLADE meets FLUID (FLTK designer) Pt 1

Posted 04-14-2015 at 04:49 AM by rainbowsally
Updated 04-14-2015 at 05:02 AM by rainbowsally (clarification)

Today's Features:
  • See how the glade files suggest the names of the gtk functions needed to "write" C/C++ directly from ui text.
  • Using anonymous child objects and parent linkage. (It's easy.)
  • Hypothetical code translation with ui definitions in comments.

I confess, I like the fltk 2.0 concept and I have reworked it into my own FTL interface creator. You'll have a heck of a time getting a copy of 2.0 anymore. And it's substantially messed up. But I like my FTL because...
Member
Posted in Uncategorized
Views 127 Comments 0 rainbowsally is offline
Old

GTK Resource Compilation Utility

Posted 04-09-2015 at 02:30 PM by rainbowsally
Updated 04-22-2015 at 01:41 PM by rainbowsally (text formatting probs)

GTK Resource Compilation.

There's a utility called 'glib-compile-resources' that takes an xml file that is basically a list of resources such as glade ui files, and it outputs c code to embed the data in the application. It's messy to use, but it works.

There may be another messy gtk/glib utility to create these xml files that 'glib-compile-resources' can use, but if there is here's another one that may or may not be easier to use.

file: src/gtk.mkres.cpp...
Member
Posted in Uncategorized
Views 128 Comments 0 rainbowsally is offline

  



All times are GMT -5. The time now is 04:47 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration