fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / FileIO / OSB / OSGOSBElementBase.inl
blob586674755dd0c7334324dbc2967baf9cd1cf48d0
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *                   Copyright (C) 2007 by the OpenSG Forum                  *
6  *                                                                           *
7  *                            www.opensg.org                                 *
8  *                                                                           *
9  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
10  *                                                                           *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13  *                                License                                    *
14  *                                                                           *
15  * This library is free software; you can redistribute it and/or modify it   *
16  * under the terms of the GNU Library General Public License as published    *
17  * by the Free Software Foundation, version 2.                               *
18  *                                                                           *
19  * This library is distributed in the hope that it will be useful, but       *
20  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
22  * Library General Public License for more details.                          *
23  *                                                                           *
24  * You should have received a copy of the GNU Library General Public         *
25  * License along with this library; if not, write to the Free Software       *
26  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
27  *                                                                           *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30  *                                Changes                                    *
31  *                                                                           *
32  *                                                                           *
33  *                                                                           *
34  *                                                                           *
35  *                                                                           *
36  *                                                                           *
37 \*---------------------------------------------------------------------------*/
40 OSG_BEGIN_NAMESPACE
42 /*-------------------------------------------------------------------------*/
43 /* OSBElementBase::BinaryReadHandler                                       */
44 /*-------------------------------------------------------------------------*/
46 /*! Skips \a size bytes of data from the underlying stream.
48     \param[in] size Number of bytes to skip.
49  */
50 inline void
51 OSBElementBase::BinaryReadHandler::skip(UInt32 size)
53     char dummy;
55     for(UInt32 i = 0; i < size; ++i)
56     {
57         get(&dummy, 1);
58     }
61 /*-------------------------------------------------------------------------*/
62 /* OSBElementBase                                                          */
63 /*-------------------------------------------------------------------------*/
65 /*-------------------------------------------------------------------------*/
66 /* State access                                                            */
68 inline FieldContainer *
69 OSBElementBase::getContainer(void)
71     return _container;
74 inline void
75 OSBElementBase::setContainer(FieldContainer * const cont)
77     _container = cont;
80 inline const OSBRootElement *
81 OSBElementBase::getRoot(void) const
83     return _rootElement;
86 inline OSBRootElement *
87 OSBElementBase::editRoot(void)
89     return _rootElement;
92 inline UInt32
93 OSBElementBase::getFCIdFile(void) const
95     return _fcIdFile;
98 inline void
99 OSBElementBase::setFCIdFile(UInt32 fcIdFile)
101     _fcIdFile = fcIdFile;
104 inline UInt16
105 OSBElementBase::getVersion(void) const
107     return _version;
110 /*-------------------------------------------------------------------------*/
111 /* OSBElementBase::PtrFieldInfo                                            */
112 /*-------------------------------------------------------------------------*/
114 inline FieldContainer *
115 OSBElementBase::PtrFieldInfo::getContainer(void) const
117     return _fc;
120 inline UInt32
121 OSBElementBase::PtrFieldInfo::getFieldId(void) const
123     return _fieldId;
126 inline const OSBElementBase::PtrFieldInfo::PtrIdStore &
127 OSBElementBase::PtrFieldInfo::getIdStore(void) const
129     return _ptrIds;
132 inline OSBElementBase::PtrFieldInfo::PtrIdStore &
133 OSBElementBase::PtrFieldInfo::editIdStore(void)
135     return _ptrIds;
138 inline OSBElementBase::PtrFieldInfo::PtrIdStoreConstIt
139 OSBElementBase::PtrFieldInfo::beginIdStore(void) const
141     return _ptrIds.begin();
144 inline OSBElementBase::PtrFieldInfo::PtrIdStoreIt
145 OSBElementBase::PtrFieldInfo::beginIdStore(void)
147     return _ptrIds.begin();
150 inline OSBElementBase::PtrFieldInfo::PtrIdStoreConstIt
151 OSBElementBase::PtrFieldInfo::endIdStore(void) const
153     return _ptrIds.end();
156 inline OSBElementBase::PtrFieldInfo::PtrIdStoreIt
157 OSBElementBase::PtrFieldInfo::endIdStore(void)
159     return _ptrIds.end();
162 inline const OSBElementBase::PtrFieldInfo::BindingStore &
163 OSBElementBase::PtrFieldInfo::getBindingStore(void) const
165     return _bindings;
168 inline OSBElementBase::PtrFieldInfo::BindingStore &
169 OSBElementBase::PtrFieldInfo::editBindingStore(void)
171     return _bindings;
174 inline OSBElementBase::PtrFieldInfo::BindingStoreConstIt
175 OSBElementBase::PtrFieldInfo::beginBindingStore(void) const
177     return _bindings.begin();
180 inline OSBElementBase::PtrFieldInfo::BindingStoreIt
181 OSBElementBase::PtrFieldInfo::beginBindingStore(void)
183     return _bindings.begin();
186 inline OSBElementBase::PtrFieldInfo::BindingStoreConstIt
187 OSBElementBase::PtrFieldInfo::endBindingStore(void) const
189     return _bindings.end();
192 inline OSBElementBase::PtrFieldInfo::BindingStoreIt
193 OSBElementBase::PtrFieldInfo::endBindingStore(void)
195     return _bindings.end();
198 inline
199 void OSBElementBase::PtrFieldInfo::setHandledField(bool bVal)
201     _bHandledField = bVal;
204 inline
205 bool OSBElementBase::PtrFieldInfo::getHandledField(void) const
207     return _bHandledField;
210 OSG_END_NAMESPACE