graphicsresourcebundle.cpp
来自「这是VCF框架的代码」· C++ 代码 · 共 91 行
CPP
91 行
//GraphicsResourceBundle.cpp/*Copyright 2000-2004 The VCF Project.Please see License.txt in the top level directorywhere you installed the VCF.*/#include "vcf/GraphicsKit/GraphicsKit.h"#include "vcf/FoundationKit/ResourceBundle.h"#include "vcf/FoundationKit/ResourceBundlePeer.h"#include "vcf/GraphicsKit/GraphicsResourceBundlePeer.h"#include "vcf/GraphicsKit/GraphicsResourceBundle.h"using namespace VCF;GraphicsResourceBundle::GraphicsResourceBundle(): ResourceBundle(), graphicsResPeer_(NULL){ delete peer_; graphicsResPeer_ = GraphicsToolkit::createGraphicsResourceBundlePeer(); if ( NULL == graphicsResPeer_ ) { //throw exception! Missing peer implementation! } peer_ = dynamic_cast<ResourceBundlePeer*>( graphicsResPeer_ ); if ( NULL == peer_ ) { //throw exception! Bad peer implementation! }}GraphicsResourceBundle::~GraphicsResourceBundle(){}Image* GraphicsResourceBundle::getImage( const String& resourceName ){ Image* result = graphicsResPeer_->getImage( resourceName ); if ( NULL == result ) { String fileName = getResourcesDirectory() + resourceName; if ( File::exists( fileName ) ) { result = GraphicsToolkit::createImage( fileName ); } } return result;}Image* GraphicsResourceBundle::getImage( const ulong32& resourceID ){ return getImage( StringUtils::toString(resourceID) );}/***CVS Log info*$Log$*Revision 1.4 2006/04/07 02:35:41 ddiego*initial checkin of merge from 0.6.9 dev branch.**Revision 1.3.2.1 2005/11/27 23:55:45 ddiego*more osx updates.**Revision 1.3 2005/01/02 03:04:25 ddiego*merged over some of the changes from the dev branch because they're important resoource loading bug fixes. Also fixes a few other bugs as well.**Revision 1.2.2.1 2004/12/19 07:09:20 ddiego*more modifications to better handle resource bundles, especially*if they are part of a LibraryApplication instance.**Revision 1.2 2004/12/01 04:31:42 ddiego*merged over devmain-0-6-6 code. Marcello did a kick ass job*of fixing a nasty bug (1074768VCF application slows down modal dialogs.)*that he found. Many, many thanks for this Marcello.**Revision 1.1.2.1 2004/08/27 03:50:47 ddiego*finished off therest of the resource refactoring code. We*can now load in resoruces either from the burned in data in the .exe*or from resource file following the Apple bundle layout scheme.**/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?