SelectionObject.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2009 Juergen Riegel  (FreeCAD@juergen-riegel.net>              *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef GUI_SelectionObject_H
00025 #define GUI_SelectionObject_H
00026 
00027 #include <Base/BaseClass.h>
00028 #include <Base/Vector3D.h>
00029 #include <string>
00030 
00031 namespace App {
00032     class DocumentObject;
00033 }
00034 
00035 namespace Gui {
00036 
00040 class GuiExport SelectionObject : public Base::BaseClass
00041 {
00042     TYPESYSTEM_HEADER();
00043 
00044 public:
00046     SelectionObject();
00047     virtual ~SelectionObject();
00051     PyObject* getPyObject();
00052 
00054     inline const std::vector<std::string> &getSubNames(void) const { return SubNames; }
00056     bool hasSubNames(void)const { return SubNames.size() != 0; }
00058     inline const char* getDocName(void) { return DocName.c_str(); }
00060     inline const char* getFeatName(void) { return FeatName.c_str(); }
00062     inline const char* getTypeName(void) { return TypeName.c_str(); }
00063 
00065     const App::DocumentObject *getObject(void) const;
00067     App::DocumentObject *getObject(void);
00068 
00070     bool isObjectTypeOf(const Base::Type& typeId) const;
00071 
00073     std::string getAsPropertyLinkSubString(void) const;
00074 
00075     friend class SelectionSingleton;
00076 
00077 protected:
00078     std::vector<std::string>    SubNames;
00079     std::string                 DocName;
00080     std::string                 FeatName;
00081     std::string                 TypeName;
00082     std::vector<Base::Vector3d> SelPoses;
00083 
00084 };
00085 
00086 
00087 } // namespace Gui
00088 
00089 
00090 #endif // GUI_SelectionObject_H 

Generated on Wed Nov 23 19:00:37 2011 for FreeCAD by  doxygen 1.6.1