Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

TextureRepository.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 <hc.h>
00013 
00014 #include <string>
00015 #include <map>
00016 #include <cstdint>
00017 
00018 class TextureRepository
00019 {
00020 public:
00021     TextureRepository(HC_KEY texturesSegmentKey);
00022 
00023     bool InsertTexture(int32_t textureId, std::size_t parameterOffset,
00024                     const std::string& textureSpecification, std::string& textureName);
00025     bool GetTexture(int32_t textureId, std::size_t parameterOffset, std::string& textureName);
00026 
00027 private:
00028     TextureRepository(const TextureRepository&);
00029     TextureRepository& operator=(const TextureRepository&);
00030 
00031     typedef int64_t Id_t;
00032 
00033     Id_t GetId(int32_t textureId, std::size_t parameterOffset);
00034 
00035 private:
00036     HC_KEY m_texturesSegment;
00037 
00038     std::map<Id_t, std::string> m_texturesMap;
00039 };