← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4099: Remove Indexable.cpp

 

------------------------------------------------------------
revno: 4099
committer: Anton Gladky <gladk@xxxxxxxxxx>
timestamp: Mon 2014-07-21 20:17:38 +0200
message:
  Remove Indexable.cpp
removed:
  lib/multimethods/Indexable.cpp
modified:
  lib/multimethods/Indexable.hpp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== removed file 'lib/multimethods/Indexable.cpp'
--- lib/multimethods/Indexable.cpp	2007-03-31 06:18:17 +0000
+++ lib/multimethods/Indexable.cpp	1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  cosurgi@xxxxxxxxxx                                                    *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
-
-#include "Indexable.hpp"
-
-
-Indexable::Indexable () 
-{
-}
-
-
-Indexable::~Indexable () 
-{
-
-}
-
-
-void Indexable::createIndex () 
-{
-	int& index = getClassIndex();
-	if(index == -1)				// assign new index
-	{
-		index = getMaxCurrentlyUsedClassIndex()+1;
-		// so that other dispatchers will not fall in conflict with this index
-		incrementMaxCurrentlyUsedClassIndex();
-	}
-
-}
-

=== modified file 'lib/multimethods/Indexable.hpp'
--- lib/multimethods/Indexable.hpp	2012-02-16 16:05:15 +0000
+++ lib/multimethods/Indexable.hpp	2014-07-21 18:17:38 +0000
@@ -24,11 +24,19 @@
 class Indexable
 {
 	protected :
-		void createIndex();
+		void createIndex() {
+			int& index = getClassIndex();
+			if(index == -1)				// assign new index
+			{
+				index = getMaxCurrentlyUsedClassIndex()+1;
+				// so that other dispatchers will not fall in conflict with this index
+				incrementMaxCurrentlyUsedClassIndex();
+			}
+		}
 
 	public :
-		Indexable ();
-		virtual ~Indexable ();
+		Indexable () {};
+		virtual ~Indexable () {};
 
 		/// Returns the id of the current class. This id is set by a multimethod manager
 		virtual int& getClassIndex()                             { _THROW_NOT_OVERRIDDEN;};