About site: Programming/Languages/C /Tools - HeronFront: C++ with Interfaces
Return to Computers also Computers
  About site: http://www.heron-language.com/heronfront.html

Title: Programming/Languages/C /Tools - HeronFront: C++ with Interfaces A pre-processor which introduces interface types into C++ by translating HeronFront files into standard C++. [Open Source]
Open_Content_Alliance Represents the collaborative efforts of a group of organizations from around the world. List of contributors, call to participate, FAQs, and press releases.

Lucent_Technologies Internet Security Solutions including VPN gateways, Firewalls and Intrusion detection.

Mathinhtml Perl script running on Linux and Windows that allows anyone to easily include mathematical content in web pages. Supports TeX and GnuPlot constructs.

Quick_Guide_to_Apache_Tomcat Fast tutorial on configuring and using Apache Tomcat for desktop development of Java servlets and JavavServer Pages (JSP).

William_Lewis_Web_Development Web site design, marketing and maintenance.

Senojweb Provides e-business consulting, content architecture, site development, management, hosting, web applications, and Internet marketing services. Based in Victoria, Australia.


  Alexa statistic for http://www.heron-language.com/heronfront.html





Get your Google PageRank






Please visit: http://www.heron-language.com/heronfront.html


  Related sites for http://www.heron-language.com/heronfront.html
    Programming_Links_for_C_/C++ Programming links for C, C++, STL, and MFC. Free compilers and tutorials
    Maltzan_org Software projects, including Java, raytracing, particle systems. About.
    Arcvic Vic-20 emulator, written in assembler.
    Jari_Aalto\'s_Emacs_Page A collection of information about Emacs providing links to Emacs related papers, Emacs lisp developer sites, notes about emacs debugging, package pointers and installation tips.
    TA-Linux Small multiarchitecture distribution for power users.
    Bibliography_of_ALT Annual Algorithmic Learning Theory conference. Since 1990. Maintained by DBLP at University of Trier.
    Soulseek Free file sharing application. News, forums, FAQ and tutorials.
    Samuel_Nyall_Stearley\'s_Programs Original TI-89 assembly programs and utilities, including Yet Another Periodic Table and Expression Writer.
    RRASTools Software to extend the functionality of RRAS (Routing and Remote Access). Features include multi IP Pools, ISDN control, and prevent concurrent logons.
    TUGWeb Users group dedicated to users of Timberline and Axium software.
    Solstice_Backup from Sun for Solaris
    Tizag_Webmaster_Fourm Created to be a stepping stone to the budding webmaster and a handy reference to the veteran developer. Topics include web development and Web marketing.
    BREXX Free interpreter for Unix, MSDOS, WinCE and Amiga. By Vassilis N. Vlachoudis.
    Software_Deals_Online Software vender of name brand products.
    The_Right_Service Supplies logo's, fliers, and photo manipulation. Websites are in Flash, DHTML, and Java.
    Sleekwebs Offers design and optimization, search engine placement, and e-commerce solutions for small businesses.
    SiteRevision_com Specializing in web design and revision, maintenance, hosting, promotion, and database services.
    Screensaver_Builder Create, compile and distribute slideshow, flash, and video screen savers.
    KDE_Components An article by Philippe Fremy, demonstrating the KDE component technology.
    RFC_2467 Transmission of IPv6 Packets over FDDI Networks. M. Crawford. December 1998.
This is websites2007.org cache of m/ as retrieved on 2008.08.29 websites2007.org's cache is the snapshot that we took of the page as we crawled the web. The page may have changed since that time.
HeronFront - Heron to C++ Translator

HeronFront

HeronFront is a tool which translates Heron trait reference types into C++ classes.

Heron Trait

Heron traits are similar to Scala traits withsome enhancements. Like Scala, in Heron a trait corresponds to a type, similar to Java interfaces.For example here is the a Stack trait in Heron: trait Stack[type Element] { requires { def push(Element x); def pop() : Element; def is_empty() : bool; } }The C++ code generated for trait references act as polymorphic pointers to any objects whichimplement a trait's requirements.Unlike Java and Scala, Heron traits support structural subtyping (a.k.a duck typing). This meansthat a trait reference type can be bound to any class which provides the required function signatures.For example consider the following C++ class which implicitly implement the Heron Stack trait: struct simple_stack { simple_stack() : cnt(0) { } static const int max = 42; void push(int n) { if (cnt > max) throw 0; data[cnt++] = n; } int pop() { return data[--cnt]; } bool is_empty() { return count() == 0; } int count() { return cnt; } int get(uint n) { return data[n]; } void set(uint n, int x) { data[n] = x; } private: int data[max + 1]; int cnt; };The simple_stack class can then be used with the generated trait reference objectas follows: void fill_stack(Stack<int> stack, int cnt) { for (int i=0; i < cnt; ++i) { stack.push(i); } } int main(int argc, char* argv[]) { simple_stack stack; fill_stack(stack, 13); return 0; }Like Scala traits, and unlike Java interfaces, Heron traits allow the definition of new functionswhich call trait functions. For instance: trait Indexable[type Element] { requires { def get(uint n) : Element; def set(uint n, Element x); def count() : uint; } public { def is_empty() : bool { return count() = 0; } } }Where Heron becomes even more interesting is that it introduces partially implemented required functions.These have a huge benefit of enforcing behavioral subtyping by verifying preconditions and postconditionsof the various member functions. For example the Stack trait can be written as: trait Stack[type Element] { requires { def push(Element x) { _override; assert(!is_empty()); } def pop() : Element { assert(!is_empty()); _override; } def is_empty() : bool; } }The _override keyword delegates the function call to the appropriate concrete implementation of the function.This is an example of programming with contracts, where the trait not only specifies the interface, but the contractualobligations of the implementation.The idea of introducing semantic information into traits addresses one of the biggest concerns with interfaces andstructural subtyping, which have been raised numerous times by countless professionals and researchers.For example a recentblog post at Artima by Eamonn McManus, bringsup the issue of lack of behavioral (or semantic) information in Java interfaces as a reason to be prudentwith the usage of Java interfaces.

Integrating HeronFront Generated Code

In order to integrate HeronFront generated code into a C++ project you need to include the header "heron.hpp". This provides some important type definitions. The HeronBack project demonstrates how to do this. HeronFront generated code is currently only tested to work on Visual C++ 7.1, though comments on issues with any other compliant compilers are welcomed. Older or non-conforming compilers are not ever going to be supported.

Implementation of HeronFront

HeronFront is public domain code, written in C++, which was developed using a public domain parsing library called the YARD parser (Yet Another Recursive Descent Parser). The YARD parser is a metaprogramming library which allows the construction of efficient recursive descent parsers using a syntax which resembles EBNF notation. Grammar productions are defined as types, for instance: struct Comment : bnf_or< SingleLineComment, FullComment > { }; The YARD library is briefly explained at http://www.ootl.org/yard/ however a more complete reference is under development by Max Lybbert.

History

The original HeronFront was written in Delphi and featured in the September 2004 issue of C/C++ User Journal, Interfaces in C++. It was designed originally as a proof of the improvements that could be gained by introducing interfaces into C++ as a replacement for using ABC's (abstract bases classes).

References

http://www.iam.unibe.ch/~scg/Archive/PhD/schaerli-phd.pdf Traits: Composable Units of Behavior Nathanael Schärli, Stéphane Ducasse, Oscar Nierstrasz, and Andrew P. Black University of Berne / OGI School of Science & Engineering, May 2003 Proceedings of ECOOP 2003 Heron home page - http://www.heron-language.com Copyright 2004, Christopher Diggins, http://www.cdiggins.com
 

A

pre-processor

which

introduces

interface

types

into

C++

by

translating

HeronFront

files

into

standard

C++.

[Open

Source]

http://www.heron-language.com/heronfront.html

HeronFront: C++ with Interfaces 2008 August

dvd rental

dvd


A pre-processor which introduces interface types into C++ by translating HeronFront files into standard C++. [Open Source]

Rules




© 2008 Internet Explorer 5+ or Netscape 6+

Recommended Sites: 1. Arts - Business - Computers - Games - Health - Home - Kids and Teens - News - Recreation - Reference - Regional - Science - Shopping - Society - Sports - World Miss Gallery - Top Anime Hentai - DVD rental by mail - Myspace Layouts - Loan - Car Accident Lawyer Los Angeles - Web Advertising - Debt Management
2008-08-29 19:26:37

Copyright 2005, 2006 by Webmaster
Websites is cool :) 191Hotel Istanbul - Hotell Dublin - Albergo Cracovia - Akwarium - Albergo Londra