Alembic 1.8.11

Loading...
Searching...
No Matches
CprImpl.h
1//-*****************************************************************************
2//
3// Copyright (c) 2009-2012,
4// Sony Pictures Imageworks Inc. and
5// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
6//
7// All rights reserved.
8//
9// Redistribution and use in source and binary forms, with or without
10// modification, are permitted provided that the following conditions are
11// met:
12// * Redistributions of source code must retain the above copyright
13// notice, this list of conditions and the following disclaimer.
14// * Redistributions in binary form must reproduce the above
15// copyright notice, this list of conditions and the following disclaimer
16// in the documentation and/or other materials provided with the
17// distribution.
18// * Neither the name of Sony Pictures Imageworks, nor
19// Industrial Light & Magic, nor the names of their contributors may be used
20// to endorse or promote products derived from this software without specific
21// prior written permission.
22//
23// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34//
35//-*****************************************************************************
36
37#ifndef Alembic_AbcCoreHDF5_CprImpl_h
38#define Alembic_AbcCoreHDF5_CprImpl_h
39
40#include <Alembic/AbcCoreHDF5/Foundation.h>
41#include <Alembic/AbcCoreHDF5/CprData.h>
42
43 namespace Alembic {
44 namespace AbcCoreHDF5 {
45 namespace ALEMBIC_VERSION_NS {
46
47//-*****************************************************************************
48 class CprImpl
49 : public AbcA::CompoundPropertyReader
50 , public Alembic::Util::enable_shared_from_this<CprImpl>
51{
52 public:
53
54 // For construction from a compound property reader
55 CprImpl( AbcA::CompoundPropertyReaderPtr iParent,
56 H5Node & iParentGroup,
57 PropertyHeaderPtr iHeader );
58
59 CprImpl( AbcA::ObjectReaderPtr iParent,
60 CprDataPtr iData );
61
62 virtual ~CprImpl();
63
64 //-*************************************************************************
65 // FROM ABSTRACT BasePropertyReader
66 //-*************************************************************************
67 virtual const AbcA::PropertyHeader & getHeader() const;
68
69 virtual AbcA::ObjectReaderPtr getObject();
70
71 virtual AbcA::CompoundPropertyReaderPtr getParent();
72
73 virtual AbcA::CompoundPropertyReaderPtr asCompoundPtr();
74
75 //-*************************************************************************
76 // FROM ABSTRACT CompoundPropertyReader
77 //-*************************************************************************
78 virtual size_t getNumProperties();
79
80 virtual const AbcA::PropertyHeader & getPropertyHeader( size_t i );
81
82 virtual const AbcA::PropertyHeader *
83 getPropertyHeader( const std::string &iName );
84
85 virtual AbcA::ScalarPropertyReaderPtr
86 getScalarProperty( const std::string &iName );
87
88 virtual AbcA::ArrayPropertyReaderPtr
89 getArrayProperty( const std::string &iName );
90
91 virtual AbcA::CompoundPropertyReaderPtr
92 getCompoundProperty( const std::string &iName );
93
94
95 private:
96
97 // Pointer to parent.
98 AbcA::CompoundPropertyReaderPtr m_parent;
99
100 // My header
101 PropertyHeaderPtr m_header;
102
103 // My Object
104 AbcA::ObjectReaderPtr m_object;
105
106 CprDataPtr m_data;
107};
108
109} // End namespace ALEMBIC_VERSION_NS
110
111 using namespace ALEMBIC_VERSION_NS;
112
113} // End namespace AbcCoreHDF5
114} // End namespace Alembic
115
116#endif
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getParent
virtual AbcA::CompoundPropertyReaderPtr getParent()
Definition CprImpl.cpp:107
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::asCompoundPtr
virtual AbcA::CompoundPropertyReaderPtr asCompoundPtr()
Definition CprImpl.cpp:113
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getObject
virtual AbcA::ObjectReaderPtr getObject()
Definition CprImpl.cpp:101
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getScalarProperty
virtual AbcA::ScalarPropertyReaderPtr getScalarProperty(const std::string &iName)
Definition CprImpl.cpp:139
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getHeader
virtual const AbcA::PropertyHeader & getHeader() const
Definition CprImpl.cpp:95
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getPropertyHeader
virtual const AbcA::PropertyHeader & getPropertyHeader(size_t i)
Definition CprImpl.cpp:125
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getCompoundProperty
virtual AbcA::CompoundPropertyReaderPtr getCompoundProperty(const std::string &iName)
Definition CprImpl.cpp:153
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getArrayProperty
virtual AbcA::ArrayPropertyReaderPtr getArrayProperty(const std::string &iName)
Definition CprImpl.cpp:146
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CprImpl::getNumProperties
virtual size_t getNumProperties()
Definition CprImpl.cpp:119
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::H5Node
Definition HDF5Hierarchy.h:50
Alembic
Alembic namespace ...
Definition ArchiveInfo.cpp:39