Alembic
1.8.11
Toggle main menu visibility
Loading...
Searching...
No Matches
SpwImpl.h
1
//-*****************************************************************************
2
//
3
// Copyright (c) 2013,
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_AbcCoreOgawa_SpwImpl_h
38
#define Alembic_AbcCoreOgawa_SpwImpl_h
39
40
#include <Alembic/AbcCoreOgawa/Foundation.h>
41
#include <Alembic/AbcCoreOgawa/WrittenSampleMap.h>
42
43
namespace
Alembic
{
44
namespace
AbcCoreOgawa {
45
namespace
ALEMBIC_VERSION_NS {
46
47
//-*****************************************************************************
48
// Scalar Property Writer.
49
class
SpwImpl
50
:
public
AbcA::ScalarPropertyWriter
51
,
public
Alembic::Util::enable_shared_from_this<SpwImpl>
52
{
53
protected
:
54
friend
class
CpwData;
55
56
//-*************************************************************************
57
SpwImpl( AbcA::CompoundPropertyWriterPtr iParent,
58
Ogawa::OGroupPtr iGroup,
59
PropertyHeaderPtr iHeader,
60
size_t
iIndex );
61
62
AbcA::ScalarPropertyWriterPtr
asScalarPtr
();
63
64
public
:
65
virtual
~SpwImpl();
66
67
// ScalarPropertyWriter overrides
68
virtual
void
setSample
(
const
void
*iSamp );
69
virtual
void
setFromPreviousSample
();
70
virtual
size_t
getNumSamples
();
71
virtual
void
setTimeSamplingIndex( Util::uint32_t iIndex );
72
73
// BasePropertyWriter overrides
74
virtual
const
AbcA::PropertyHeader &
getHeader
()
const
;
75
virtual
AbcA::ObjectWriterPtr
getObject
();
76
virtual
AbcA::CompoundPropertyWriterPtr
getParent
();
77
78
protected
:
79
// Previous written array sample identifier!
80
WrittenSampleIDPtr m_previousWrittenSampleID;
81
82
private
:
83
// The parent compound property writer.
84
AbcA::CompoundPropertyWriterPtr m_parent;
85
86
// The header which defines this property.
87
// And extra data the parent needs to eventually write out
88
PropertyHeaderPtr m_header;
89
90
// for accumulating our hierarchical hash
91
Util::Digest
m_hash;
92
93
Ogawa::OGroupPtr m_group;
94
95
size_t
m_index;
96
};
97
98
}
// End namespace ALEMBIC_VERSION_NS
99
100
using namespace
ALEMBIC_VERSION_NS;
101
102
}
// End namespace AbcCoreOgawa
103
}
// End namespace Alembic
104
105
#endif
Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl::getNumSamples
virtual size_t getNumSamples()
Definition
SpwImpl.cpp:212
Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl::getObject
virtual AbcA::ObjectWriterPtr getObject()
Definition
SpwImpl.cpp:241
Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl::getParent
virtual AbcA::CompoundPropertyWriterPtr getParent()
Definition
SpwImpl.cpp:248
Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl::setFromPreviousSample
virtual void setFromPreviousSample()
Definition
SpwImpl.cpp:106
Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl::asScalarPtr
AbcA::ScalarPropertyWriterPtr asScalarPtr()
Definition
SpwImpl.cpp:206
Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl::setSample
virtual void setSample(const void *iSamp)
Definition
SpwImpl.cpp:128
Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl::getHeader
virtual const AbcA::PropertyHeader & getHeader() const
Definition
SpwImpl.cpp:234
Alembic
Alembic namespace ...
Definition
ArchiveInfo.cpp:39
Alembic::Util::ALEMBIC_VERSION_NS::Digest
Definition
Digest.h:51
AbcCoreOgawa
SpwImpl.h
Generated by
1.18.0