VR-Forces 4.0.4 Class Documentation
include/vrvVrl/DtAttributeGroupTemplateManager.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2010 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: DtAttributeGroupTemplateManager.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *********************************************************************/
00008 #pragma once
00009 
00010 #include <vrvVrl/vrvVrl.h>
00011 
00012 #include <vrvUtil/DtVirtualBaseClass.h>
00013 
00014 #ifndef DT_PROTOCOL_NAMESPACE
00015 #error Namespace Protocol Macro DT_PROTOCOL_NAMESPACE not defined.
00016 #endif
00017 
00018 namespace makVrv
00019 {
00020    namespace DT_PROTOCOL_NAMESPACE
00021    {
00022       class DtVrlinkConnection;
00023 
00027       class DL_DLL_IGCONVRLINK DtAttributeGroupTemplateManager : public DtVirtualBaseClass
00028       {
00029       public:
00031          static DtAttributeGroupTemplateManager& instance(DtVrlinkConnection& sim);
00032 
00034          virtual ~DtAttributeGroupTemplateManager();
00035 
00037          virtual void addAttributeTemplate(const DtGlobalObjectDesignator& groupId,
00038             const std::string& name, int attributeType, double minRange, double maxRange);
00039 
00041          virtual bool getAttributeTemplateInfo(const DtGlobalObjectDesignator& groupId,
00042             const std::string& name, int& attributeType, double& minRange, double& maxRange,
00043             int& index);
00044 
00045          virtual void removeAttributeTemplate(const DtGlobalObjectDesignator& groupId,
00046             const std::string& name);
00047 
00048          boost::signal<void (const DtGlobalObjectDesignator& groupId, const std::string& name,
00049             int attributeType, double minRange, double maxRange, int index)> signal_templateAdded;
00050 
00051       private:
00053          DtAttributeGroupTemplateManager(const DtAttributeGroupTemplateManager& copy);
00054 
00056          DtAttributeGroupTemplateManager& operator=(const DtAttributeGroupTemplateManager& copy);
00057 
00058       protected:
00059          DtAttributeGroupTemplateManager(DtVrlinkConnection& simulation);
00060 
00061       protected:
00062          struct DtAttributeTemplateInfo
00063          {
00064             int myAttributeType;
00065             double myMinRange;
00066             double myMaxRange;
00067             int myIndex;
00068          };
00069 
00070          DtVrlinkConnection& mySimulation;
00071          typedef std::map<std::pair<DtGlobalObjectDesignator, std::string>, DtAttributeTemplateInfo> AttributeTemplateMap;
00072          AttributeTemplateMap myAttributeTemplateMap;
00073          std::map<DtGlobalObjectDesignator, int> myAttributesPerGroup;
00074 
00075       };
00076    }
00077 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)