From Marco Jez (with tweaks by Robert Osfield) : clean up of inheritance from std::vector<> classes
This commit is contained in:
@@ -34,7 +34,7 @@ void DrawArrays::accept(PrimitiveIndexFunctor& functor) const
|
||||
void DrawArrayLengths::draw(State&, bool) const
|
||||
{
|
||||
GLint first = _first;
|
||||
for(VectorSizei::const_iterator itr=begin();
|
||||
for(vector_type::const_iterator itr=begin();
|
||||
itr!=end();
|
||||
++itr)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ void DrawArrayLengths::draw(State&, bool) const
|
||||
void DrawArrayLengths::accept(PrimitiveFunctor& functor) const
|
||||
{
|
||||
GLint first = _first;
|
||||
for(VectorSizei::const_iterator itr=begin();
|
||||
for(vector_type::const_iterator itr=begin();
|
||||
itr!=end();
|
||||
++itr)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ void DrawArrayLengths::accept(PrimitiveFunctor& functor) const
|
||||
void DrawArrayLengths::accept(PrimitiveIndexFunctor& functor) const
|
||||
{
|
||||
GLint first = _first;
|
||||
for(VectorSizei::const_iterator itr=begin();
|
||||
for(vector_type::const_iterator itr=begin();
|
||||
itr!=end();
|
||||
++itr)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ void DrawArrayLengths::accept(PrimitiveIndexFunctor& functor) const
|
||||
unsigned int DrawArrayLengths::getNumIndices() const
|
||||
{
|
||||
unsigned int count = 0;
|
||||
for(VectorSizei::const_iterator itr=begin();
|
||||
for(vector_type::const_iterator itr=begin();
|
||||
itr!=end();
|
||||
++itr)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ void DrawArrayLengths::write(DataOutputStream* out){
|
||||
// Write array length and its elements.
|
||||
out->writeInt(size());
|
||||
for(unsigned int i=0; i<size(); i++){
|
||||
out->writeInt(((osg::VectorSizei)(*this))[i]);
|
||||
out->writeInt(((*this))[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ unsigned int getNextCharacter(look_ahead_iterator& charString,String::Encoding e
|
||||
|
||||
String::String(const String& str):
|
||||
osg::Referenced(),
|
||||
VectorUInt(str)
|
||||
vector_type(str)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@ BEGIN_OBJECT_REFLECTOR(osg::DrawArrays)
|
||||
I_Property(GLint, First);
|
||||
END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< GLubyte >, osg::DrawElementsUByte::vector_type);
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUByte)
|
||||
I_BaseType(osg::PrimitiveSet);
|
||||
I_ConstructorWithDefaults1(IN, GLenum, mode, 0);
|
||||
@@ -98,6 +100,8 @@ BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUByte)
|
||||
I_ReadOnlyProperty(unsigned int, TotalDataSize);
|
||||
END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< GLuint >, osg::DrawElementsUInt::vector_type);
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUInt)
|
||||
I_BaseType(osg::PrimitiveSet);
|
||||
I_ConstructorWithDefaults1(IN, GLenum, mode, 0);
|
||||
@@ -122,6 +126,8 @@ BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUInt)
|
||||
I_ReadOnlyProperty(unsigned int, TotalDataSize);
|
||||
END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< GLushort >, osg::DrawElementsUShort::vector_type);
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUShort)
|
||||
I_BaseType(osg::PrimitiveSet);
|
||||
I_ConstructorWithDefaults1(IN, GLenum, mode, 0);
|
||||
@@ -231,16 +237,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::PrimitiveSet)
|
||||
I_ReadOnlyProperty(osg::PrimitiveSet::Type, Type);
|
||||
END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< GLsizei >, osg::VectorSizei);
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< GLubyte >, osg::VectorUByte);
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< GLushort >, osg::VectorUShort);
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< GLuint >, osg::VectorUInt);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< GLsizei >);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< GLubyte >);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< GLuint >);
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< unsigned int >, osgText::String::vector_type);
|
||||
|
||||
BEGIN_ENUM_REFLECTOR(osgText::String::Encoding)
|
||||
I_EnumLabel(osgText::String::ENCODING_UNDEFINED);
|
||||
I_EnumLabel(osgText::String::ENCODING_ASCII);
|
||||
@@ -46,5 +48,3 @@ BEGIN_OBJECT_REFLECTOR(osgText::String)
|
||||
I_WriteOnlyProperty(const wchar_t *, );
|
||||
END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< unsigned int >, osgText::VectorUInt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user