00001 //-***************************************************************************** 00002 // 00003 // Copyright (c) 2009-2011, 00004 // Sony Pictures Imageworks, Inc. and 00005 // Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. 00006 // 00007 // All rights reserved. 00008 // 00009 // Redistribution and use in source and binary forms, with or without 00010 // modification, are permitted provided that the following conditions are 00011 // met: 00012 // * Redistributions of source code must retain the above copyright 00013 // notice, this list of conditions and the following disclaimer. 00014 // * Redistributions in binary form must reproduce the above 00015 // copyright notice, this list of conditions and the following disclaimer 00016 // in the documentation and/or other materials provided with the 00017 // distribution. 00018 // * Neither the name of Sony Pictures Imageworks, nor 00019 // Industrial Light & Magic nor the names of their contributors may be used 00020 // to endorse or promote products derived from this software without specific 00021 // prior written permission. 00022 // 00023 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00024 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00025 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00026 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00027 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00028 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00029 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00030 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00031 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00032 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 // 00035 //-***************************************************************************** 00036 00037 #ifndef _Alembic_AbcCoreHDF5_ProtoObjectReader_h_ 00038 #define _Alembic_AbcCoreHDF5_ProtoObjectReader_h_ 00039 00040 #include <Alembic/AbcCoreHDF5/Foundation.h> 00041 00042 namespace Alembic { 00043 namespace AbcCoreHDF5 { 00044 namespace ALEMBIC_VERSION_NS { 00045 00046 //-***************************************************************************** 00047 class ProtoObjectReader : private boost::noncopyable 00048 { 00049 public: 00050 ProtoObjectReader( hid_t iParentProperty, 00051 const std::string &iParentFullPathName, 00052 const std::string &iName ); 00053 ~ProtoObjectReader(); 00054 00055 hid_t getGroup() const { return m_group; } 00056 00057 const AbcA::ObjectHeader &getHeader() const { return m_header; } 00058 00059 protected: 00060 hid_t m_group; 00061 00062 AbcA::ObjectHeader m_header; 00063 }; 00064 00065 //-***************************************************************************** 00066 typedef boost::shared_ptr<ProtoObjectReader> ProtoObjectReaderPtr; 00067 00068 inline ProtoObjectReaderPtr 00069 MakeProtoObjectReaderPtr( hid_t iParentProperty, 00070 const std::string &iParentFullPathName, 00071 const std::string &iName ) 00072 { 00073 return boost::make_shared<ProtoObjectReader>( iParentProperty, 00074 iParentFullPathName, 00075 iName ); 00076 } 00077 00078 } // End namespace ALEMBIC_VERSION_NS 00079 00080 using namespace ALEMBIC_VERSION_NS; 00081 00082 } // End namespace AbcCoreHDF5 00083 } // End namespace Alembic 00084 00085 #endif
1.5.9