Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit 6e437dd

Browse files
committed
Adding in Ogawa files. Does not yet compile.
1 parent 156228e commit 6e437dd

29 files changed

+3741
-0
lines changed

include/All.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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_Ogawa_All_h_
38+
#define _Alembic_Ogawa_All_h_
39+
40+
#include <Alembic/Ogawa/Foundation.h>
41+
#include <Alembic/Ogawa/IArchive.h>
42+
#include <Alembic/Ogawa/IData.h>
43+
#include <Alembic/Ogawa/IGroup.h>
44+
#include <Alembic/Ogawa/IStreams.h>
45+
#include <Alembic/Ogawa/OArchive.h>
46+
#include <Alembic/Ogawa/OData.h>
47+
#include <Alembic/Ogawa/OGroup.h>
48+
#include <Alembic/Ogawa/OStream.h>
49+
50+
#endif

include/Foundation.h

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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 Industrial Light & Magic nor the names of
19+
// its contributors may be used to endorse or promote products derived
20+
// from this software without specific prior written permission.
21+
//
22+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33+
//
34+
//-*****************************************************************************
35+
36+
#ifndef _Alembic_Ogawa_Foundation_h_
37+
#define _Alembic_Ogawa_Foundation_h_
38+
39+
#include <Alembic/Util/Foundation.h>
40+
#include <Alembic/Util/PlainOldDataType.h>
41+
42+
namespace Alembic {
43+
namespace Ogawa {
44+
namespace ALEMBIC_VERSION_NS {
45+
46+
// a few useful constant values
47+
const Alembic::Util::uint64_t INVALID_GROUP = 0x7fffffffffffffffULL;
48+
const Alembic::Util::uint64_t EMPTY_GROUP = 0x0000000000000000ULL;
49+
const Alembic::Util::uint64_t INVALID_DATA = 0xffffffffffffffffULL;
50+
const Alembic::Util::uint64_t EMPTY_DATA = 0x8000000000000000ULL;
51+
52+
} // End namespace ALEMBIC_VERSION_NS
53+
54+
using namespace ALEMBIC_VERSION_NS;
55+
56+
} // End namespace Ogawa
57+
58+
} // End namespace Alembic
59+
60+
#endif

include/IArchive.h

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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 Industrial Light & Magic nor the names of
19+
// its contributors may be used to endorse or promote products derived
20+
// from this software without specific prior written permission.
21+
//
22+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33+
//
34+
//-*****************************************************************************
35+
36+
#ifndef _Alembic_Ogawa_IArchive_h_
37+
#define _Alembic_Ogawa_IArchive_h_
38+
39+
#include <Alembic/Ogawa/Foundation.h>
40+
#include <Alembic/Ogawa/IStreams.h>
41+
#include <Alembic/Ogawa/IGroup.h>
42+
43+
#include <istream>
44+
45+
namespace Alembic {
46+
namespace Ogawa {
47+
namespace ALEMBIC_VERSION_NS {
48+
49+
class IArchive
50+
{
51+
public:
52+
IArchive(const std::string & iFileName, std::size_t iNumStreams=1);
53+
IArchive(const std::vector< std::istream * > & iStreams);
54+
~IArchive();
55+
56+
bool isValid() const;
57+
58+
bool isFrozen() const;
59+
60+
Alembic::Util::uint16_t getVersion() const;
61+
62+
IGroupPtr getGroup() const;
63+
64+
private:
65+
void init();
66+
IStreamsPtr mStreams;
67+
IGroupPtr mGroup;
68+
};
69+
70+
typedef Alembic::Util::shared_ptr< IArchive > IArchivePtr;
71+
72+
} // End namespace ALEMBIC_VERSION_NS
73+
74+
using namespace ALEMBIC_VERSION_NS;
75+
76+
} // End namespace Ogawa
77+
78+
} // End namespace Alembic
79+
80+
#endif

include/IData.h

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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 Industrial Light & Magic nor the names of
19+
// its contributors may be used to endorse or promote products derived
20+
// from this software without specific prior written permission.
21+
//
22+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33+
//
34+
//-*****************************************************************************
35+
36+
#ifndef _Alembic_Ogawa_IData_h_
37+
#define _Alembic_Ogawa_IData_h_
38+
39+
#include <Alembic/Ogawa/Foundation.h>
40+
#include <Alembic/Ogawa/IStreams.h>
41+
42+
namespace Alembic {
43+
namespace Ogawa {
44+
namespace ALEMBIC_VERSION_NS {
45+
46+
class IData
47+
{
48+
public:
49+
50+
~IData();
51+
52+
void read(Alembic::Util::uint64_t iSize, void * iData,
53+
Alembic::Util::uint64_t iOffset, std::size_t iThreadId);
54+
55+
Alembic::Util::uint64_t getSize() const;
56+
57+
// not really necessary for most workflows, it could be used by some
58+
// Ogawa utilities to detect when this IData is shared
59+
Alembic::Util::uint64_t getPos() const;
60+
61+
private:
62+
friend class IGroup;
63+
IData(IStreamsPtr iStreams, Alembic::Util::uint64_t iPos,
64+
std::size_t iThreadId);
65+
66+
class PrivateData;
67+
std::auto_ptr< PrivateData > mData;
68+
};
69+
70+
typedef Alembic::Util::shared_ptr< IData > IDataPtr;
71+
72+
} // End namespace ALEMBIC_VERSION_NS
73+
74+
using namespace ALEMBIC_VERSION_NS;
75+
76+
} // End namespace Ogawa
77+
78+
} // End namespace Alembic
79+
80+
#endif

include/IGroup.h

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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 Industrial Light & Magic nor the names of
19+
// its contributors may be used to endorse or promote products derived
20+
// from this software without specific prior written permission.
21+
//
22+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33+
//
34+
//-*****************************************************************************
35+
36+
#ifndef _Alembic_Ogawa_IGroup_h_
37+
#define _Alembic_Ogawa_IGroup_h_
38+
39+
#include <Alembic/Ogawa/Foundation.h>
40+
#include <Alembic/Ogawa/IStreams.h>
41+
#include <Alembic/Ogawa/IData.h>
42+
43+
namespace Alembic {
44+
namespace Ogawa {
45+
namespace ALEMBIC_VERSION_NS {
46+
47+
class IGroup;
48+
typedef Alembic::Util::shared_ptr< IGroup > IGroupPtr;
49+
50+
class IGroup
51+
{
52+
public:
53+
~IGroup();
54+
55+
IGroupPtr getGroup(Alembic::Util::uint64_t iIndex, bool iLight,
56+
std::size_t iThreadIndex);
57+
58+
IDataPtr getData(Alembic::Util::uint64_t iIndex, std::size_t iThreadIndex);
59+
60+
Alembic::Util::uint64_t getNumChildren() const;
61+
62+
bool isChildGroup(Alembic::Util::uint64_t iIndex) const;
63+
bool isChildData(Alembic::Util::uint64_t iIndex) const;
64+
65+
bool isEmptyChildGroup(Alembic::Util::uint64_t iIndex) const;
66+
bool isEmptyChildData(Alembic::Util::uint64_t iIndex) const;
67+
68+
bool isLight() const;
69+
70+
private:
71+
friend class IArchive;
72+
IGroup(IStreamsPtr iStreams, Alembic::Util::uint64_t iPos, bool iLight,
73+
std::size_t iThreadIndex);
74+
75+
class PrivateData;
76+
Alembic::Util::auto_ptr< PrivateData > mData;
77+
};
78+
79+
} // End namespace ALEMBIC_VERSION_NS
80+
81+
using namespace ALEMBIC_VERSION_NS;
82+
83+
} // End namespace Ogawa
84+
85+
} // End namespace Alembic
86+
87+
#endif

0 commit comments

Comments
 (0)