Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

SegmentKey3DF.h
00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
00002 //
00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
00004 // and considered a trade secret as defined under civil and criminal statutes.
00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
00006 // unauthorized use or misappropriation of its trade secrets.  Use of this information
00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
00009 
00010 #pragma once
00011 
00012 #include "SegmentKey.h"
00013 
00014 #include <hc.h>
00015 
00016 
00017 // Non-ref counted HC_KEY / HPS::SegmentKey abstraction
00018 class SegmentKey3DF : public SegmentKey
00019 {
00020 public:
00021     SegmentKey3DF(HC_KEY k) : _key(k) { }
00022 
00023     SegmentKey3DF(SegmentKey & seg)
00024         : _key(static_cast<SegmentKey3DF&>(seg)._key)
00025     {
00026     }
00027 
00028     virtual ~SegmentKey3DF() {
00029         _key = HC_ERROR_KEY;
00030     }
00031 
00032     virtual SegmentKeyPtr Clone();
00033     virtual void Open() const;
00034     virtual void Close() const;
00035     virtual SegmentKeyPtr Subsegment(const char *name) const;
00036     virtual intptr_t id() const { return (intptr_t)_key; }
00037 
00038     HC_KEY Get() const { return _key; }
00039 
00040 
00041 private:
00042     HC_KEY      _key;
00043 };
00044 
00045 typedef std::shared_ptr<SegmentKey3DF>  SegmentKey3DFPtr;