Click here to Skip to main content
15,881,812 members
Articles / Programming Languages / C++

MultiMethods in C++: Finding a complete solution

Rate me:
Please Sign up or sign in to vote.
4.58/5 (33 votes)
29 Jun 20066 min read 193.2K   797   67  
An indepth discussion of how typesafe multimethods can be implemented in standard C++.
#ifndef __RIGHTTRIANGLE_H_
#define __RIGHTTRIANGLE_H_

#include "Triangle.h"

class RightTriangle_ : public Triangle_
{
public:
  RightTriangle_( Point_ const& _p0, Point_ const& _p1, Point_ const& _p2 );

  virtual void Visit( IDispatcher& _dispatcher );
};

#endif //__RIGHTTRIANGLE_H_

/*
Copyright (C) 2004
Danil G. Shopyrin

Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation.  Danil G. Shopyrin makes no representations
about the suitability of this software for any purpose.
It is provided "as is" without express or implied warranty.
*/

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Russian Federation Russian Federation
An experienced software developer.

Now I'm participating in VisualSVN project that is an integration package between Subversion and Visual Studio.

Comments and Discussions