Skip to content

Commit c1fed4b

Browse files
committed
Remove namespace alias
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
1 parent 6cea328 commit c1fed4b

1 file changed

Lines changed: 60 additions & 60 deletions

File tree

src/bindings/python/PyOpenColorIO.h

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#ifndef INCLUDED_OCIO_PYOPENCOLORIO_H
55
#define INCLUDED_OCIO_PYOPENCOLORIO_H
66

7+
#include <typeinfo>
8+
79
#include <pybind11/pybind11.h>
810
#include <pybind11/operators.h>
911
#include <pybind11/stl.h>
@@ -58,142 +60,140 @@ void bindPyMixingHelpers(pybind11::module & m);
5860
// is needed to return Transform subclass types from the OCIO API. See:
5961
// https://pybind11.readthedocs.io/en/stable/advanced/classes.html#custom-automatic-downcasters
6062

61-
namespace OCIO = OCIO_NAMESPACE;
62-
6363
namespace PYBIND11_NAMESPACE
6464
{
6565

6666
template<>
67-
struct polymorphic_type_hook<OCIO::ImageDesc> {
68-
static const void *get(const OCIO::ImageDesc *const src, const std::type_info*& type) {
67+
struct polymorphic_type_hook<OCIO_NAMESPACE::ImageDesc> {
68+
static const void *get(const OCIO_NAMESPACE::ImageDesc *const src, const std::type_info*& type) {
6969
// Note: src may be nullptr
7070
if (src)
7171
{
72-
if(dynamic_cast<const OCIO::PackedImageDesc*>(src))
72+
if(dynamic_cast<const OCIO_NAMESPACE::PackedImageDesc*>(src))
7373
{
74-
type = &typeid(OCIO::PackedImageDesc);
74+
type = &typeid(OCIO_NAMESPACE::PackedImageDesc);
7575
}
76-
else if(dynamic_cast<const OCIO::PlanarImageDesc*>(src))
76+
else if(dynamic_cast<const OCIO_NAMESPACE::PlanarImageDesc*>(src))
7777
{
78-
type = &typeid(OCIO::PlanarImageDesc);
78+
type = &typeid(OCIO_NAMESPACE::PlanarImageDesc);
7979
}
8080
}
8181
return src;
8282
}
8383
};
8484

8585
template<>
86-
struct polymorphic_type_hook<OCIO::GpuShaderCreator> {
87-
static const void *get(const OCIO::GpuShaderCreator *const src, const std::type_info*& type) {
86+
struct polymorphic_type_hook<OCIO_NAMESPACE::GpuShaderCreator> {
87+
static const void *get(const OCIO_NAMESPACE::GpuShaderCreator *const src, const std::type_info*& type) {
8888
// Note: src may be nullptr
8989
if (src)
9090
{
91-
if(dynamic_cast<const OCIO::GpuShaderDesc*>(src))
91+
if(dynamic_cast<const OCIO_NAMESPACE::GpuShaderDesc*>(src))
9292
{
93-
type = &typeid(OCIO::GpuShaderDesc);
93+
type = &typeid(OCIO_NAMESPACE::GpuShaderDesc);
9494
}
9595
}
9696
return src;
9797
}
9898
};
9999

100100
template<>
101-
struct polymorphic_type_hook<OCIO::Transform> {
102-
static const void *get(const OCIO::Transform *const src, const std::type_info*& type) {
101+
struct polymorphic_type_hook<OCIO_NAMESPACE::Transform> {
102+
static const void *get(const OCIO_NAMESPACE::Transform *const src, const std::type_info*& type) {
103103
// Note: src may be nullptr
104104
if (src)
105105
{
106-
if(dynamic_cast<const OCIO::AllocationTransform*>(src))
106+
if(dynamic_cast<const OCIO_NAMESPACE::AllocationTransform*>(src))
107107
{
108-
type = &typeid(OCIO::AllocationTransform);
108+
type = &typeid(OCIO_NAMESPACE::AllocationTransform);
109109
}
110-
else if(dynamic_cast<const OCIO::BuiltinTransform*>(src))
110+
else if(dynamic_cast<const OCIO_NAMESPACE::BuiltinTransform*>(src))
111111
{
112-
type = &typeid(OCIO::BuiltinTransform);
112+
type = &typeid(OCIO_NAMESPACE::BuiltinTransform);
113113
}
114-
else if(dynamic_cast<const OCIO::CDLTransform*>(src))
114+
else if(dynamic_cast<const OCIO_NAMESPACE::CDLTransform*>(src))
115115
{
116-
type = &typeid(OCIO::CDLTransform);
116+
type = &typeid(OCIO_NAMESPACE::CDLTransform);
117117
}
118-
else if(dynamic_cast<const OCIO::ColorSpaceTransform*>(src))
118+
else if(dynamic_cast<const OCIO_NAMESPACE::ColorSpaceTransform*>(src))
119119
{
120-
type = &typeid(OCIO::ColorSpaceTransform);
120+
type = &typeid(OCIO_NAMESPACE::ColorSpaceTransform);
121121
}
122-
else if(dynamic_cast<const OCIO::DisplayViewTransform*>(src))
122+
else if(dynamic_cast<const OCIO_NAMESPACE::DisplayViewTransform*>(src))
123123
{
124-
type = &typeid(OCIO::DisplayViewTransform);
124+
type = &typeid(OCIO_NAMESPACE::DisplayViewTransform);
125125
}
126-
else if(dynamic_cast<const OCIO::ExponentTransform*>(src))
126+
else if(dynamic_cast<const OCIO_NAMESPACE::ExponentTransform*>(src))
127127
{
128-
type = &typeid(OCIO::ExponentTransform);
128+
type = &typeid(OCIO_NAMESPACE::ExponentTransform);
129129
}
130-
else if(dynamic_cast<const OCIO::ExponentWithLinearTransform*>(src))
130+
else if(dynamic_cast<const OCIO_NAMESPACE::ExponentWithLinearTransform*>(src))
131131
{
132-
type = &typeid(OCIO::ExponentWithLinearTransform);
132+
type = &typeid(OCIO_NAMESPACE::ExponentWithLinearTransform);
133133
}
134-
else if(dynamic_cast<const OCIO::ExposureContrastTransform*>(src))
134+
else if(dynamic_cast<const OCIO_NAMESPACE::ExposureContrastTransform*>(src))
135135
{
136-
type = &typeid(OCIO::ExposureContrastTransform);
136+
type = &typeid(OCIO_NAMESPACE::ExposureContrastTransform);
137137
}
138-
else if(dynamic_cast<const OCIO::FileTransform*>(src))
138+
else if(dynamic_cast<const OCIO_NAMESPACE::FileTransform*>(src))
139139
{
140-
type = &typeid(OCIO::FileTransform);
140+
type = &typeid(OCIO_NAMESPACE::FileTransform);
141141
}
142-
else if(dynamic_cast<const OCIO::FixedFunctionTransform*>(src))
142+
else if(dynamic_cast<const OCIO_NAMESPACE::FixedFunctionTransform*>(src))
143143
{
144-
type = &typeid(OCIO::FixedFunctionTransform);
144+
type = &typeid(OCIO_NAMESPACE::FixedFunctionTransform);
145145
}
146-
else if (dynamic_cast<const OCIO::GradingPrimaryTransform*>(src))
146+
else if (dynamic_cast<const OCIO_NAMESPACE::GradingPrimaryTransform*>(src))
147147
{
148-
type = &typeid(OCIO::GradingPrimaryTransform);
148+
type = &typeid(OCIO_NAMESPACE::GradingPrimaryTransform);
149149
}
150-
else if (dynamic_cast<const OCIO::GradingRGBCurveTransform*>(src))
150+
else if (dynamic_cast<const OCIO_NAMESPACE::GradingRGBCurveTransform*>(src))
151151
{
152-
type = &typeid(OCIO::GradingRGBCurveTransform);
152+
type = &typeid(OCIO_NAMESPACE::GradingRGBCurveTransform);
153153
}
154-
else if (dynamic_cast<const OCIO::GradingHueCurveTransform*>(src))
154+
else if (dynamic_cast<const OCIO_NAMESPACE::GradingHueCurveTransform*>(src))
155155
{
156-
type = &typeid(OCIO::GradingHueCurveTransform);
156+
type = &typeid(OCIO_NAMESPACE::GradingHueCurveTransform);
157157
}
158-
else if(dynamic_cast<const OCIO::GradingToneTransform*>(src))
158+
else if(dynamic_cast<const OCIO_NAMESPACE::GradingToneTransform*>(src))
159159
{
160-
type = &typeid(OCIO::GradingToneTransform);
160+
type = &typeid(OCIO_NAMESPACE::GradingToneTransform);
161161
}
162-
else if(dynamic_cast<const OCIO::GroupTransform*>(src))
162+
else if(dynamic_cast<const OCIO_NAMESPACE::GroupTransform*>(src))
163163
{
164-
type = &typeid(OCIO::GroupTransform);
164+
type = &typeid(OCIO_NAMESPACE::GroupTransform);
165165
}
166-
else if(dynamic_cast<const OCIO::LogAffineTransform*>(src))
166+
else if(dynamic_cast<const OCIO_NAMESPACE::LogAffineTransform*>(src))
167167
{
168-
type = &typeid(OCIO::LogAffineTransform);
168+
type = &typeid(OCIO_NAMESPACE::LogAffineTransform);
169169
}
170-
else if(dynamic_cast<const OCIO::LogCameraTransform*>(src))
170+
else if(dynamic_cast<const OCIO_NAMESPACE::LogCameraTransform*>(src))
171171
{
172-
type = &typeid(OCIO::LogCameraTransform);
172+
type = &typeid(OCIO_NAMESPACE::LogCameraTransform);
173173
}
174-
else if(dynamic_cast<const OCIO::LogTransform*>(src))
174+
else if(dynamic_cast<const OCIO_NAMESPACE::LogTransform*>(src))
175175
{
176-
type = &typeid(OCIO::LogTransform);
176+
type = &typeid(OCIO_NAMESPACE::LogTransform);
177177
}
178-
else if(dynamic_cast<const OCIO::LookTransform*>(src))
178+
else if(dynamic_cast<const OCIO_NAMESPACE::LookTransform*>(src))
179179
{
180-
type = &typeid(OCIO::LookTransform);
180+
type = &typeid(OCIO_NAMESPACE::LookTransform);
181181
}
182-
else if(dynamic_cast<const OCIO::Lut1DTransform*>(src))
182+
else if(dynamic_cast<const OCIO_NAMESPACE::Lut1DTransform*>(src))
183183
{
184-
type = &typeid(OCIO::Lut1DTransform);
184+
type = &typeid(OCIO_NAMESPACE::Lut1DTransform);
185185
}
186-
else if(dynamic_cast<const OCIO::Lut3DTransform*>(src))
186+
else if(dynamic_cast<const OCIO_NAMESPACE::Lut3DTransform*>(src))
187187
{
188-
type = &typeid(OCIO::Lut3DTransform);
188+
type = &typeid(OCIO_NAMESPACE::Lut3DTransform);
189189
}
190-
else if(dynamic_cast<const OCIO::MatrixTransform*>(src))
190+
else if(dynamic_cast<const OCIO_NAMESPACE::MatrixTransform*>(src))
191191
{
192-
type = &typeid(OCIO::MatrixTransform);
192+
type = &typeid(OCIO_NAMESPACE::MatrixTransform);
193193
}
194-
else if(dynamic_cast<const OCIO::RangeTransform*>(src))
194+
else if(dynamic_cast<const OCIO_NAMESPACE::RangeTransform*>(src))
195195
{
196-
type = &typeid(OCIO::RangeTransform);
196+
type = &typeid(OCIO_NAMESPACE::RangeTransform);
197197
}
198198
}
199199
return src;

0 commit comments

Comments
 (0)