• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • objects
common.cc
Go to the documentation of this file.
1 // Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
2 
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17 
18 #include "common.h"
19 #include "object_holder.h"
20 
21 std::vector<ObjectCalcer*> getAllCalcers( const std::vector<ObjectHolder*>& os )
22 {
23  std::set<ObjectCalcer*> ret;
24  for ( std::vector<ObjectHolder*>::const_iterator i = os.begin();
25  i != os.end(); ++i )
26  {
27  if ( ( *i )->nameCalcer() )
28  ret.insert( ( *i )->nameCalcer() );
29  ret.insert( ( *i )->calcer() );
30  }
31  return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
32 }
33 
34 std::vector<ObjectCalcer*> getCalcers( const std::vector<ObjectHolder*>& os )
35 {
36  std::vector<ObjectCalcer*> ret;
37  ret.reserve( os.size() );
38  for ( std::vector<ObjectHolder*>::const_iterator i = os.begin();
39  i != os.end(); ++i )
40  ret.push_back( ( *i )->calcer() );
41  return ret;
42 }
43 
getAllCalcers
std::vector< ObjectCalcer * > getAllCalcers(const std::vector< ObjectHolder * > &os)
get the calcers that the holders represent and their namecalcers
Definition: common.cc:21
common.h
getCalcers
std::vector< ObjectCalcer * > getCalcers(const std::vector< ObjectHolder * > &os)
get the calcers that the holders represent ( not their namecalcers )
Definition: common.cc:34
object_holder.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal