Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 17, 2011, 5:47:22 AM (13 years ago)
Author:
rgrieder
Message:

Stripped down trunk to form a new light sandbox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/forks/sandbox_light/src/libraries/util/MultiType.h

    r7401 r7908  
    100100#include <cassert>
    101101#include <string>
    102 #include <OgreVector2.h>
    103 #include <OgreVector3.h>
    104 #include <OgreVector4.h>
    105 #include <OgreQuaternion.h>
    106 #include <OgreColourValue.h>
     102#include <ogremath/OgreVector2.h>
     103#include <ogremath/OgreVector3.h>
     104#include <ogremath/OgreVector4.h>
     105#include <ogremath/OgreQuaternion.h>
     106#include <ogremath/OgreColourValue.h>
    107107#include <loki/TypeTraits.h>
    108108#include "mbool.h"
     
    260260
    261261            virtual void toString(std::ostream& outstream) const = 0;
    262 
    263             virtual void importData( uint8_t*& mem )=0;
    264             virtual void exportData( uint8_t*& mem ) const=0;
    265             virtual uint8_t getSize() const=0;
    266262
    267263            MT_Type::Value type_;   ///< The type of the current value
     
    374370            std::string                       getTypename()               const;
    375371
    376             /// Saves the value of the MT to a bytestream (pointed at by mem) and increases mem pointer by size of MT
    377             inline void                       exportData(uint8_t*& mem) const { assert(sizeof(MT_Type::Value)<=8); *static_cast<uint8_t*>(mem) = this->getType(); mem+=sizeof(uint8_t); this->value_->exportData(mem); }
    378             /// Loads the value of the MT from a bytestream (pointed at by mem) and increases mem pointer by size of MT
    379             inline void                       importData(uint8_t*& mem) { assert(sizeof(MT_Type::Value)<=8); this->setType(static_cast<MT_Type::Value>(*static_cast<uint8_t*>(mem))); mem+=sizeof(uint8_t); this->value_->importData(mem); }
    380             /// Saves the value of the MT to a bytestream and increases pointer to bytestream by size of MT
    381             inline uint8_t*&                  operator << (uint8_t*& mem) { importData(mem); return mem; }
    382             /// Loads the value of the MT to a bytestream and increases pointer to bytestream by size of MT
    383             inline void                       operator >> (uint8_t*& mem) const { exportData(mem); }
    384             inline uint32_t                   getNetworkSize() const { assert(this->value_); return this->value_->getSize() + sizeof(uint8_t); }
    385 
    386372            /// Checks whether the value is a default one (assigned after a failed conversion)
    387373            bool                              hasDefaultValue() const { return this->value_->hasDefaultValue(); }
Note: See TracChangeset for help on using the changeset viewer.