OpenClonk
Ogre Namespace Reference

Namespaces

 Mesh
 
 Skeleton
 

Classes

class  ChunkBase
 
class  DataStream
 

Typedefs

template<typename T >
using unique_ptr_vector = std::vector< std::unique_ptr< T > >
 

Functions

 DEFINE_EXCEPTION (InsufficientData, "Premature end of data stream")
 
 DEFINE_EXCEPTION (MultipleSingletonChunks, "A singleton chunk was found multiple times")
 
template<>
std::string DataStream::Peek< std::string > () const
 
template<>
std::string DataStream::Read< std::string > ()
 

Typedef Documentation

◆ unique_ptr_vector

template<typename T >
using Ogre::unique_ptr_vector = typedef std::vector<std::unique_ptr<T> >

Definition at line 277 of file StdMeshLoaderBinaryChunks.h.

Function Documentation

◆ DataStream::Peek< std::string >()

template<>
std::string Ogre::DataStream::Peek< std::string > ( ) const
inline

Definition at line 91 of file StdMeshLoaderDataStream.h.

92  {
93  // Ogre terminates strings with \n
94  const char *terminator = static_cast<const char*>(std::memchr(cursor, '\n', GetRemainingBytes()));
95  if (!terminator)
96  throw InsufficientData("Unterminated string");
97  return std::string(cursor, terminator);
98  }

◆ DataStream::Read< std::string >()

template<>
std::string Ogre::DataStream::Read< std::string > ( )
inline

Definition at line 100 of file StdMeshLoaderDataStream.h.

101  {
102  std::string temp = Peek<std::string>();
103  Seek(temp.size() + 1);
104  return temp;
105  }

◆ DEFINE_EXCEPTION() [1/2]

Ogre::DEFINE_EXCEPTION ( InsufficientData  ,
"Premature end of data stream"   
)

◆ DEFINE_EXCEPTION() [2/2]

Ogre::DEFINE_EXCEPTION ( MultipleSingletonChunks  ,
"A singleton chunk was found multiple times"   
)