fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Image / OSGImageBase.inl
blob7e47bb9399c20d575b43ef9fa8bcc453a1e45b97
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *               Copyright (C) 2000-2013 by the OpenSG Forum                 *
6  *                                                                           *
7  * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net  *
8  *                                                                           *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
11  *                                License                                    *
12  *                                                                           *
13  * This library is free software; you can redistribute it and/or modify it   *
14  * under the terms of the GNU Library General Public License as published    *
15  * by the Free Software Foundation, version 2.                               *
16  *                                                                           *
17  * This library is distributed in the hope that it will be useful, but       *
18  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
20  * Library General Public License for more details.                          *
21  *                                                                           *
22  * You should have received a copy of the GNU Library General Public         *
23  * License along with this library; if not, write to the Free Software       *
24  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
25  *                                                                           *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
28  *                                Changes                                    *
29  *                                                                           *
30  *                                                                           *
31  *                                                                           *
32  *                                                                           *
33  *                                                                           *
34  *                                                                           *
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38  *****************************************************************************
39  **                                                                         **
40  **                  This file is automatically generated.                  **
41  **                                                                         **
42  **          Any changes made to this file WILL be lost when it is          **
43  **           regenerated, which can become necessary at any time.          **
44  **                                                                         **
45  **     Do not change this file, changes should be done in the derived      **
46  **     class Image!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ImageBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ImageBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ImageBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Image::_sfDimension field.
79 inline
80 Int32 &ImageBase::editDimension(void)
82     editSField(DimensionFieldMask);
84     return _sfDimension.getValue();
87 //! Get the value of the Image::_sfDimension field.
88 inline
89       Int32  ImageBase::getDimension(void) const
91     return _sfDimension.getValue();
94 //! Set the value of the Image::_sfDimension field.
95 inline
96 void ImageBase::setDimension(const Int32 value)
98     editSField(DimensionFieldMask);
100     _sfDimension.setValue(value);
102 //! Get the value of the Image::_sfWidth field.
104 inline
105 Int32 &ImageBase::editWidth(void)
107     editSField(WidthFieldMask);
109     return _sfWidth.getValue();
112 //! Get the value of the Image::_sfWidth field.
113 inline
114       Int32  ImageBase::getWidth(void) const
116     return _sfWidth.getValue();
119 //! Set the value of the Image::_sfWidth field.
120 inline
121 void ImageBase::setWidth(const Int32 value)
123     editSField(WidthFieldMask);
125     _sfWidth.setValue(value);
127 //! Get the value of the Image::_sfHeight field.
129 inline
130 Int32 &ImageBase::editHeight(void)
132     editSField(HeightFieldMask);
134     return _sfHeight.getValue();
137 //! Get the value of the Image::_sfHeight field.
138 inline
139       Int32  ImageBase::getHeight(void) const
141     return _sfHeight.getValue();
144 //! Set the value of the Image::_sfHeight field.
145 inline
146 void ImageBase::setHeight(const Int32 value)
148     editSField(HeightFieldMask);
150     _sfHeight.setValue(value);
152 //! Get the value of the Image::_sfDepth field.
154 inline
155 Int32 &ImageBase::editDepth(void)
157     editSField(DepthFieldMask);
159     return _sfDepth.getValue();
162 //! Get the value of the Image::_sfDepth field.
163 inline
164       Int32  ImageBase::getDepth(void) const
166     return _sfDepth.getValue();
169 //! Set the value of the Image::_sfDepth field.
170 inline
171 void ImageBase::setDepth(const Int32 value)
173     editSField(DepthFieldMask);
175     _sfDepth.setValue(value);
177 //! Get the value of the Image::_sfBpp field.
179 inline
180 Int32 &ImageBase::editBpp(void)
182     editSField(BppFieldMask);
184     return _sfBpp.getValue();
187 //! Get the value of the Image::_sfBpp field.
188 inline
189       Int32  ImageBase::getBpp(void) const
191     return _sfBpp.getValue();
194 //! Set the value of the Image::_sfBpp field.
195 inline
196 void ImageBase::setBpp(const Int32 value)
198     editSField(BppFieldMask);
200     _sfBpp.setValue(value);
202 //! Get the value of the Image::_sfMipMapCount field.
204 inline
205 Int32 &ImageBase::editMipMapCount(void)
207     editSField(MipMapCountFieldMask);
209     return _sfMipMapCount.getValue();
212 //! Get the value of the Image::_sfMipMapCount field.
213 inline
214       Int32  ImageBase::getMipMapCount(void) const
216     return _sfMipMapCount.getValue();
219 //! Set the value of the Image::_sfMipMapCount field.
220 inline
221 void ImageBase::setMipMapCount(const Int32 value)
223     editSField(MipMapCountFieldMask);
225     _sfMipMapCount.setValue(value);
227 //! Get the value of the Image::_sfFrameCount field.
229 inline
230 Int32 &ImageBase::editFrameCount(void)
232     editSField(FrameCountFieldMask);
234     return _sfFrameCount.getValue();
237 //! Get the value of the Image::_sfFrameCount field.
238 inline
239       Int32  ImageBase::getFrameCount(void) const
241     return _sfFrameCount.getValue();
244 //! Set the value of the Image::_sfFrameCount field.
245 inline
246 void ImageBase::setFrameCount(const Int32 value)
248     editSField(FrameCountFieldMask);
250     _sfFrameCount.setValue(value);
252 //! Get the value of the Image::_sfFrameDelay field.
254 inline
255 Time &ImageBase::editFrameDelay(void)
257     editSField(FrameDelayFieldMask);
259     return _sfFrameDelay.getValue();
262 //! Get the value of the Image::_sfFrameDelay field.
263 inline
264 const Time &ImageBase::getFrameDelay(void) const
266     return _sfFrameDelay.getValue();
269 //! Set the value of the Image::_sfFrameDelay field.
270 inline
271 void ImageBase::setFrameDelay(const Time &value)
273     editSField(FrameDelayFieldMask);
275     _sfFrameDelay.setValue(value);
277 //! Get the value of the Image::_sfPixelFormat field.
279 inline
280 UInt32 &ImageBase::editPixelFormat(void)
282     editSField(PixelFormatFieldMask);
284     return _sfPixelFormat.getValue();
287 //! Get the value of the Image::_sfPixelFormat field.
288 inline
289       UInt32  ImageBase::getPixelFormat(void) const
291     return _sfPixelFormat.getValue();
294 //! Set the value of the Image::_sfPixelFormat field.
295 inline
296 void ImageBase::setPixelFormat(const UInt32 value)
298     editSField(PixelFormatFieldMask);
300     _sfPixelFormat.setValue(value);
302 //! Get the value of the Image::_sfFrameSize field.
304 inline
305 Int32 &ImageBase::editFrameSize(void)
307     editSField(FrameSizeFieldMask);
309     return _sfFrameSize.getValue();
312 //! Get the value of the Image::_sfFrameSize field.
313 inline
314       Int32  ImageBase::getFrameSize(void) const
316     return _sfFrameSize.getValue();
319 //! Set the value of the Image::_sfFrameSize field.
320 inline
321 void ImageBase::setFrameSize(const Int32 value)
323     editSField(FrameSizeFieldMask);
325     _sfFrameSize.setValue(value);
327 //! Get the value of the Image::_sfName field.
329 inline
330 std::string &ImageBase::editName(void)
332     editSField(NameFieldMask);
334     return _sfName.getValue();
337 //! Get the value of the Image::_sfName field.
338 inline
339 const std::string &ImageBase::getName(void) const
341     return _sfName.getValue();
344 //! Set the value of the Image::_sfName field.
345 inline
346 void ImageBase::setName(const std::string &value)
348     editSField(NameFieldMask);
350     _sfName.setValue(value);
352 //! Get the value of the Image::_sfDataType field.
354 inline
355 Int32 &ImageBase::editDataType(void)
357     editSField(DataTypeFieldMask);
359     return _sfDataType.getValue();
362 //! Get the value of the Image::_sfDataType field.
363 inline
364       Int32  ImageBase::getDataType(void) const
366     return _sfDataType.getValue();
369 //! Set the value of the Image::_sfDataType field.
370 inline
371 void ImageBase::setDataType(const Int32 value)
373     editSField(DataTypeFieldMask);
375     _sfDataType.setValue(value);
377 //! Get the value of the Image::_sfComponentSize field.
379 inline
380 Int32 &ImageBase::editComponentSize(void)
382     editSField(ComponentSizeFieldMask);
384     return _sfComponentSize.getValue();
387 //! Get the value of the Image::_sfComponentSize field.
388 inline
389       Int32  ImageBase::getComponentSize(void) const
391     return _sfComponentSize.getValue();
394 //! Set the value of the Image::_sfComponentSize field.
395 inline
396 void ImageBase::setComponentSize(const Int32 value)
398     editSField(ComponentSizeFieldMask);
400     _sfComponentSize.setValue(value);
402 //! Get the value of the Image::_sfSideCount field.
404 inline
405 Int32 &ImageBase::editSideCount(void)
407     editSField(SideCountFieldMask);
409     return _sfSideCount.getValue();
412 //! Get the value of the Image::_sfSideCount field.
413 inline
414       Int32  ImageBase::getSideCount(void) const
416     return _sfSideCount.getValue();
419 //! Set the value of the Image::_sfSideCount field.
420 inline
421 void ImageBase::setSideCount(const Int32 value)
423     editSField(SideCountFieldMask);
425     _sfSideCount.setValue(value);
427 //! Get the value of the Image::_sfSideSize field.
429 inline
430 Int32 &ImageBase::editSideSize(void)
432     editSField(SideSizeFieldMask);
434     return _sfSideSize.getValue();
437 //! Get the value of the Image::_sfSideSize field.
438 inline
439       Int32  ImageBase::getSideSize(void) const
441     return _sfSideSize.getValue();
444 //! Set the value of the Image::_sfSideSize field.
445 inline
446 void ImageBase::setSideSize(const Int32 value)
448     editSField(SideSizeFieldMask);
450     _sfSideSize.setValue(value);
452 //! Get the value of the Image::_sfForceCompressedData field.
454 inline
455 bool &ImageBase::editForceCompressedData(void)
457     editSField(ForceCompressedDataFieldMask);
459     return _sfForceCompressedData.getValue();
462 //! Get the value of the Image::_sfForceCompressedData field.
463 inline
464       bool  ImageBase::getForceCompressedData(void) const
466     return _sfForceCompressedData.getValue();
469 //! Set the value of the Image::_sfForceCompressedData field.
470 inline
471 void ImageBase::setForceCompressedData(const bool value)
473     editSField(ForceCompressedDataFieldMask);
475     _sfForceCompressedData.setValue(value);
477 //! Get the value of the Image::_sfForceAlphaChannel field.
479 inline
480 bool &ImageBase::editForceAlphaChannel(void)
482     editSField(ForceAlphaChannelFieldMask);
484     return _sfForceAlphaChannel.getValue();
487 //! Get the value of the Image::_sfForceAlphaChannel field.
488 inline
489       bool  ImageBase::getForceAlphaChannel(void) const
491     return _sfForceAlphaChannel.getValue();
494 //! Set the value of the Image::_sfForceAlphaChannel field.
495 inline
496 void ImageBase::setForceAlphaChannel(const bool value)
498     editSField(ForceAlphaChannelFieldMask);
500     _sfForceAlphaChannel.setValue(value);
502 //! Get the value of the Image::_sfForceColorChannel field.
504 inline
505 bool &ImageBase::editForceColorChannel(void)
507     editSField(ForceColorChannelFieldMask);
509     return _sfForceColorChannel.getValue();
512 //! Get the value of the Image::_sfForceColorChannel field.
513 inline
514       bool  ImageBase::getForceColorChannel(void) const
516     return _sfForceColorChannel.getValue();
519 //! Set the value of the Image::_sfForceColorChannel field.
520 inline
521 void ImageBase::setForceColorChannel(const bool value)
523     editSField(ForceColorChannelFieldMask);
525     _sfForceColorChannel.setValue(value);
527 //! Get the value of the Image::_sfForceAlphaBinary field.
529 inline
530 bool &ImageBase::editForceAlphaBinary(void)
532     editSField(ForceAlphaBinaryFieldMask);
534     return _sfForceAlphaBinary.getValue();
537 //! Get the value of the Image::_sfForceAlphaBinary field.
538 inline
539       bool  ImageBase::getForceAlphaBinary(void) const
541     return _sfForceAlphaBinary.getValue();
544 //! Set the value of the Image::_sfForceAlphaBinary field.
545 inline
546 void ImageBase::setForceAlphaBinary(const bool value)
548     editSField(ForceAlphaBinaryFieldMask);
550     _sfForceAlphaBinary.setValue(value);
552 //! Get the value of the Image::_sfResX field.
554 inline
555 Real32 &ImageBase::editResX(void)
557     editSField(ResXFieldMask);
559     return _sfResX.getValue();
562 //! Get the value of the Image::_sfResX field.
563 inline
564       Real32  ImageBase::getResX(void) const
566     return _sfResX.getValue();
569 //! Set the value of the Image::_sfResX field.
570 inline
571 void ImageBase::setResX(const Real32 value)
573     editSField(ResXFieldMask);
575     _sfResX.setValue(value);
577 //! Get the value of the Image::_sfResY field.
579 inline
580 Real32 &ImageBase::editResY(void)
582     editSField(ResYFieldMask);
584     return _sfResY.getValue();
587 //! Get the value of the Image::_sfResY field.
588 inline
589       Real32  ImageBase::getResY(void) const
591     return _sfResY.getValue();
594 //! Set the value of the Image::_sfResY field.
595 inline
596 void ImageBase::setResY(const Real32 value)
598     editSField(ResYFieldMask);
600     _sfResY.setValue(value);
602 //! Get the value of the Image::_sfResUnit field.
604 inline
605 UInt16 &ImageBase::editResUnit(void)
607     editSField(ResUnitFieldMask);
609     return _sfResUnit.getValue();
612 //! Get the value of the Image::_sfResUnit field.
613 inline
614       UInt16  ImageBase::getResUnit(void) const
616     return _sfResUnit.getValue();
619 //! Set the value of the Image::_sfResUnit field.
620 inline
621 void ImageBase::setResUnit(const UInt16 value)
623     editSField(ResUnitFieldMask);
625     _sfResUnit.setValue(value);
627 //! Get the value of the Image::_sfClearOnLoad field.
629 inline
630 bool &ImageBase::editClearOnLoad(void)
632     editSField(ClearOnLoadFieldMask);
634     return _sfClearOnLoad.getValue();
637 //! Get the value of the Image::_sfClearOnLoad field.
638 inline
639       bool  ImageBase::getClearOnLoad(void) const
641     return _sfClearOnLoad.getValue();
644 //! Set the value of the Image::_sfClearOnLoad field.
645 inline
646 void ImageBase::setClearOnLoad(const bool value)
648     editSField(ClearOnLoadFieldMask);
650     _sfClearOnLoad.setValue(value);
653 //! Get the value of the \a index element the Image::_mfPixel field.
654 inline
655       UInt8  ImageBase::getPixel(const UInt32 index) const
657     return _mfPixel[index];
660 inline
661 MFUInt8            ::reference ImageBase::editPixel(const UInt32 index)
663     editMField(PixelFieldMask, _mfPixel);
665     return _mfPixel[index];
669 #ifdef OSG_MT_CPTR_ASPECT
670 inline
671 void ImageBase::execSync (      ImageBase *pFrom,
672                                         ConstFieldMaskArg  whichField,
673                                         AspectOffsetStore &oOffsets,
674                                         ConstFieldMaskArg  syncMode,
675                                   const UInt32             uiSyncInfo)
677     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
679     if(FieldBits::NoField != (ParentsFieldMask & whichField))
680         _mfParents.syncWith(pFrom->_mfParents,
681                                 syncMode,
682                                 uiSyncInfo,
683                                 oOffsets);
685     if(FieldBits::NoField != (DimensionFieldMask & whichField))
686         _sfDimension.syncWith(pFrom->_sfDimension);
688     if(FieldBits::NoField != (WidthFieldMask & whichField))
689         _sfWidth.syncWith(pFrom->_sfWidth);
691     if(FieldBits::NoField != (HeightFieldMask & whichField))
692         _sfHeight.syncWith(pFrom->_sfHeight);
694     if(FieldBits::NoField != (DepthFieldMask & whichField))
695         _sfDepth.syncWith(pFrom->_sfDepth);
697     if(FieldBits::NoField != (BppFieldMask & whichField))
698         _sfBpp.syncWith(pFrom->_sfBpp);
700     if(FieldBits::NoField != (MipMapCountFieldMask & whichField))
701         _sfMipMapCount.syncWith(pFrom->_sfMipMapCount);
703     if(FieldBits::NoField != (FrameCountFieldMask & whichField))
704         _sfFrameCount.syncWith(pFrom->_sfFrameCount);
706     if(FieldBits::NoField != (FrameDelayFieldMask & whichField))
707         _sfFrameDelay.syncWith(pFrom->_sfFrameDelay);
709     if(FieldBits::NoField != (PixelFormatFieldMask & whichField))
710         _sfPixelFormat.syncWith(pFrom->_sfPixelFormat);
712     if(FieldBits::NoField != (PixelFieldMask & whichField))
713         _mfPixel.syncWith(pFrom->_mfPixel,
714                                 syncMode,
715                                 uiSyncInfo,
716                                 oOffsets);
718     if(FieldBits::NoField != (FrameSizeFieldMask & whichField))
719         _sfFrameSize.syncWith(pFrom->_sfFrameSize);
721     if(FieldBits::NoField != (NameFieldMask & whichField))
722         _sfName.syncWith(pFrom->_sfName);
724     if(FieldBits::NoField != (DataTypeFieldMask & whichField))
725         _sfDataType.syncWith(pFrom->_sfDataType);
727     if(FieldBits::NoField != (ComponentSizeFieldMask & whichField))
728         _sfComponentSize.syncWith(pFrom->_sfComponentSize);
730     if(FieldBits::NoField != (SideCountFieldMask & whichField))
731         _sfSideCount.syncWith(pFrom->_sfSideCount);
733     if(FieldBits::NoField != (SideSizeFieldMask & whichField))
734         _sfSideSize.syncWith(pFrom->_sfSideSize);
736     if(FieldBits::NoField != (ForceCompressedDataFieldMask & whichField))
737         _sfForceCompressedData.syncWith(pFrom->_sfForceCompressedData);
739     if(FieldBits::NoField != (ForceAlphaChannelFieldMask & whichField))
740         _sfForceAlphaChannel.syncWith(pFrom->_sfForceAlphaChannel);
742     if(FieldBits::NoField != (ForceColorChannelFieldMask & whichField))
743         _sfForceColorChannel.syncWith(pFrom->_sfForceColorChannel);
745     if(FieldBits::NoField != (ForceAlphaBinaryFieldMask & whichField))
746         _sfForceAlphaBinary.syncWith(pFrom->_sfForceAlphaBinary);
748     if(FieldBits::NoField != (ResXFieldMask & whichField))
749         _sfResX.syncWith(pFrom->_sfResX);
751     if(FieldBits::NoField != (ResYFieldMask & whichField))
752         _sfResY.syncWith(pFrom->_sfResY);
754     if(FieldBits::NoField != (ResUnitFieldMask & whichField))
755         _sfResUnit.syncWith(pFrom->_sfResUnit);
757     if(FieldBits::NoField != (ClearOnLoadFieldMask & whichField))
758         _sfClearOnLoad.syncWith(pFrom->_sfClearOnLoad);
760 #endif
763 inline
764 const Char8 *ImageBase::getClassname(void)
766     return "Image";
768 OSG_GEN_CONTAINERPTR(Image);
770 OSG_END_NAMESPACE