~ubuntu-branches/debian/jessie/yade/jessie

« back to all changes in this revision

Viewing changes to lib/multimethods/Indexable.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-08-04 19:34:58 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140804193458-cw8qhnujxe9wzi15
Tags: 1.11.0-1
* [a0600ae] Imported Upstream version 1.11.0
* [a3055e0] Do not use parallel build on kfreebsd-amd64 and s390x.
* [f86b405] Remove applied patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*************************************************************************
2
 
*  Copyright (C) 2004 by Janek Kozicki                                   *
3
 
*  cosurgi@berlios.de                                                    *
4
 
*                                                                        *
5
 
*  This program is free software; it is licensed under the terms of the  *
6
 
*  GNU General Public License v2 or later. See file LICENSE for details. *
7
 
*************************************************************************/
8
 
 
9
 
#include "Indexable.hpp"
10
 
 
11
 
 
12
 
Indexable::Indexable () 
13
 
{
14
 
}
15
 
 
16
 
 
17
 
Indexable::~Indexable () 
18
 
{
19
 
 
20
 
}
21
 
 
22
 
 
23
 
void Indexable::createIndex () 
24
 
{
25
 
        int& index = getClassIndex();
26
 
        if(index == -1)                         // assign new index
27
 
        {
28
 
                index = getMaxCurrentlyUsedClassIndex()+1;
29
 
                // so that other dispatchers will not fall in conflict with this index
30
 
                incrementMaxCurrentlyUsedClassIndex();
31
 
        }
32
 
 
33
 
}
34