CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/Fireworks/Core/src/FWViewContextMenuHandlerBase.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Core
00004 // Class  :     FWViewContextMenuHandlerBase
00005 // 
00006 // Implementation:
00007 //     [Notes on implementation]
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Mon Nov  2 13:46:48 CST 2009
00011 // $Id: FWViewContextMenuHandlerBase.cc,v 1.4 2011/03/25 18:02:46 amraktad Exp $
00012 //
00013 
00014 // system include files
00015 
00016 // user include files
00017 #include "Fireworks/Core/interface/FWViewContextMenuHandlerBase.h"
00018 #include "Fireworks/Core/src/FWModelContextMenuHandler.h"
00019 
00020 //
00021 // constants, enums and typedefs
00022 //
00023 
00024 //
00025 // static data member definitions
00026 //
00027 FWViewContextMenuHandlerBase::MenuEntryAdder::MenuEntryAdder(FWModelContextMenuHandler& iHandler):
00028 m_handler(&iHandler){}
00029    
00030 int 
00031 FWViewContextMenuHandlerBase::MenuEntryAdder::addEntry(const char* iEntryName, int idx, bool enabled)
00032 {
00033    m_handler->addViewEntry(iEntryName, idx, enabled);
00034    return idx;
00035 }
00036 
00037 
00038 //
00039 // constructors and destructor
00040 //
00041 FWViewContextMenuHandlerBase::FWViewContextMenuHandlerBase()
00042 {
00043 }
00044 
00045 // FWViewContextMenuHandlerBase::FWViewContextMenuHandlerBase(const FWViewContextMenuHandlerBase& rhs)
00046 // {
00047 //    // do actual copying here;
00048 // }
00049 
00050 FWViewContextMenuHandlerBase::~FWViewContextMenuHandlerBase()
00051 {
00052 }
00053 
00054 //
00055 // assignment operators
00056 //
00057 // const FWViewContextMenuHandlerBase& FWViewContextMenuHandlerBase::operator=(const FWViewContextMenuHandlerBase& rhs)
00058 // {
00059 //   //An exception safe implementation is
00060 //   FWViewContextMenuHandlerBase temp(rhs);
00061 //   swap(rhs);
00062 //
00063 //   return *this;
00064 // }
00065 
00066 //
00067 // member functions
00068 //
00069 void 
00070 FWViewContextMenuHandlerBase::addTo(FWModelContextMenuHandler& iHandle, const FWModelId &id)
00071 {
00072    MenuEntryAdder adder(iHandle);
00073    init(adder, id);
00074 }