--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn 6 years ago
commit dbce461590

@ -224,7 +224,7 @@ public:
// @{
// first param is the associated window.
// Must be a HWND for Windows (WIN32).
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show = true, bool resizeable = true) throw(EBadDisplay) = 0;
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show = true, bool resizeable = true) = 0;
// Must be called after a setDisplay that initialize the mode
virtual bool setMode(const GfxMode &mode) = 0;
virtual bool getModes(std::vector<GfxMode> &modes) = 0;

@ -134,14 +134,14 @@ class CDRU
public:
/// Portable Function which create a GL Driver (using gl dll...).
static IDriver *createGlDriver() throw(EDru);
static IDriver *createGlDriver();
/// Portable Function which create a GL ES Driver (using gl dll...).
static IDriver *createGlEsDriver() throw(EDru);
static IDriver *createGlEsDriver();
#ifdef NL_OS_WINDOWS
/// Windows Function which create a Direct3d Driver.
static IDriver *createD3DDriver() throw(EDru);
static IDriver *createD3DDriver();
#endif // NL_OS_WINDOWS
/// \name 2D render.

@ -168,9 +168,9 @@ public:
void clear();
/// Verify the binding of patchs of all zones. throw EBadBind if error.
void checkBinds() throw(EBadBind);
void checkBinds();
/// Verify the binding of patchs of one zone. throw EBadBind if error. nop if zone not loaded.
void checkBinds(uint16 zoneId) throw(EBadBind);
void checkBinds(uint16 zoneId);
/**
* Build tileBank. Call this after loading the near and far tile banks.

@ -64,7 +64,7 @@ public:
*
* You can access the driver with CNELU::Driver.
*/
static bool initDriver(uint w, uint h, uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen=false, bool direct3d=false) throw(EDru);
static bool initDriver(uint w, uint h, uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen=false, bool direct3d=false);
/** Init all that we need for a Scene.
* - register scene basics models,
@ -108,7 +108,7 @@ public:
* - initScene();
* - initEventServer();
*/
static bool init(uint w, uint h, CViewport viewport=CViewport(), uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen = false, bool direct3d = false) throw(EDru);
static bool init(uint w, uint h, CViewport viewport=CViewport(), uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen = false, bool direct3d = false);
/** Delete all:
* - releaseEventServer();

@ -118,7 +118,7 @@ namespace NLGUI
/** read/write between values on a lua stack & a property exported from a 'CReflectable' derived object
* (throws on error)
*/
static void luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property) throw(ELuaIHMException);
static void luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property);
// push a reflected property on the stack
// NB : no check is done that 'property' is part of the class info of 'reflectedObject'

@ -110,7 +110,7 @@ namespace NLGUI
/** create a sub table for this object, with a string as a key
* This object must be a table or an exception if thrown
*/
CLuaObject newTable(const char *tableName) throw(ELuaNotATable);
CLuaObject newTable(const char *tableName);
/** Set a value in a table.
@ -118,29 +118,29 @@ namespace NLGUI
* NB : value should came from the same lua environment
* \TODO other type of keys
*/
void setValue(const char *key, const CLuaObject &value) throw(ELuaNotATable);
void setValue(const std::string &key, const CLuaObject &value) throw(ELuaNotATable) { setValue(key.c_str(), value); }
void setValue(const char *key, const std::string &value) throw(ELuaNotATable);
void setValue(const char *key, const char *value) throw(ELuaNotATable);
void setValue(const char *key, bool value) throw(ELuaNotATable);
void setValue(const char *key, TLuaWrappedFunction value) throw(ELuaNotATable);
void setValue(const char *key, double value) throw(ELuaNotATable);
void setValue(const char *key, uint32 value) throw(ELuaNotATable);
void setValue(const char *key, sint32 value) throw(ELuaNotATable);
void setValue(const char *key, sint64 value) throw(ELuaNotATable);
void setValue(const std::string &key, const std::string &value) throw(ELuaNotATable) { setValue(key.c_str(), value); }
void setNil(const char *key) throw(ELuaNotATable);
void setNil(const std::string &key) throw(ELuaNotATable) { setNil(key.c_str()); }
void setValue(const char *key, const CLuaObject &value);
void setValue(const std::string &key, const CLuaObject &value) { setValue(key.c_str(), value); }
void setValue(const char *key, const std::string &value);
void setValue(const char *key, const char *value);
void setValue(const char *key, bool value);
void setValue(const char *key, TLuaWrappedFunction value);
void setValue(const char *key, double value);
void setValue(const char *key, uint32 value);
void setValue(const char *key, sint32 value);
void setValue(const char *key, sint64 value);
void setValue(const std::string &key, const std::string &value) { setValue(key.c_str(), value); }
void setNil(const char *key);
void setNil(const std::string &key) { setNil(key.c_str()); }
/** Erase a value in a table by its key.
* If this object is not a table then an exception is thrown.
* \TODO other type of keys
*/
void eraseValue(const char *key) throw(ELuaNotATable);
void eraseValue(const std::string &key) throw(ELuaNotATable) { eraseValue(key.c_str()); }
void eraseValue(const char *key);
void eraseValue(const std::string &key) { eraseValue(key.c_str()); }
// test is this object is enumerable
bool isEnumerable() const;
// Enumeration of a table. If the object is not a table, an exception is thrown.
CLuaEnumeration enumerate() throw(ELuaNotATable);
CLuaEnumeration enumerate();
// retrieve metatable of an object (or nil if object has no metatable)
CLuaObject getMetaTable() const;
// set metatable for this object
@ -155,7 +155,7 @@ namespace NLGUI
CLuaObject operator[](const std::string &key) const { return operator[](key.c_str()); }
/** Checked access to a sub element of a table. An exception is thrown is the element is not a table.
*/
CLuaObject at(const char *key) const throw (ELuaNotATable);
CLuaObject at(const char *key) const;
CLuaObject at(const std::string &key) const { return at(key.c_str()); }
// Test is that table has the given key. The object must be a table or an exception is thrown

@ -86,10 +86,10 @@ public:
static void release();
/// Register your class for future Instanciation.
static void registerClass(const std::string &className, IClassable* (*creator)(), const std::string &typeidCheck) throw(ERegistry);
static void registerClass(const std::string &className, IClassable* (*creator)(), const std::string &typeidCheck);
/// Create an object from his class name.
static IClassable *create(const std::string &className) throw(ERegistry);
static IClassable *create(const std::string &className);
/// check if the object has been correctly registered. Must be used for debug only, and Must compile with RTTI.
static bool checkObject(IClassable* obj);

@ -108,9 +108,9 @@ public: // Advanced Usage.
/// flush the file.
void flush();
/// Seek the file
bool seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream);
bool seek (sint32 offset, IStream::TSeekOrigin origin) const;
/// Get the location of the file pointer
sint32 getPos () const throw(EStream);
sint32 getPos () const;
// Imp the Name of the stream as the name of the file.
virtual std::string getStreamName() const;
@ -125,7 +125,7 @@ public: // Advanced Usage.
// return true if there's nothing more to read (same as ifstream)
bool eof ();
virtual void serialBuffer(uint8 *buf, uint len)throw(EReadError);
virtual void serialBuffer(uint8 *buf, uint len);
/// \name Statistics
@ -148,7 +148,7 @@ public: // Advanced Usage.
static void clearDump ();
protected:
virtual void serialBit(bool &bit) throw(EReadError);
virtual void serialBit(bool &bit);
virtual uint getDbgStreamSize() const;
@ -223,20 +223,20 @@ public: // Advanced Usage.
/// flush the file.
void flush();
/// Seek the file
bool seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream);
bool seek (sint32 offset, IStream::TSeekOrigin origin) const;
/// Get the location of the file pointer
sint32 getPos () const throw(EStream);
sint32 getPos () const;
// Imp the Name of the stream as the name of the file.
virtual std::string getStreamName() const;
// very useful to serialize string in text mode (without the size)
virtual void serialBuffer(uint8 *buf, uint len) throw(EWriteError);
virtual void serialBuffer(uint8 *buf, uint len);
protected:
/// Internal close.
void internalClose(bool success);
virtual void serialBit(bool &bit) throw(EWriteError);
virtual void serialBit(bool &bit);
private:
FILE *_F;

@ -197,7 +197,7 @@ public:
* \return true if seek sucessfull.
* \see ESeekNotSupported SeekOrigin getPos
*/
virtual bool seek (sint32 offset, TSeekOrigin origin) const throw(EStream);
virtual bool seek (sint32 offset, TSeekOrigin origin) const;
/**
* Get the location of the stream pointer.

@ -226,7 +226,7 @@ public:
std::string toString() { if(Ptr) return toString(*Ptr); else return "<null>"; }
// serial using serialPtr
void serialPtr(NLMISC::IStream &f) throw(NLMISC::EStream )
void serialPtr(NLMISC::IStream &f)
{
T* obj= NULL;
if(f.isReading())
@ -242,7 +242,7 @@ public:
}
}
// serial using serialPloyPtr
void serialPolyPtr(NLMISC::IStream &f) throw(NLMISC::EStream )
void serialPolyPtr(NLMISC::IStream &f)
{
T* obj= NULL;
if(f.isReading())
@ -337,7 +337,7 @@ public:
void kill();
// serial using serialPloyPtr
void serialPolyPtr(NLMISC::IStream &f) throw(NLMISC::EStream )
void serialPolyPtr(NLMISC::IStream &f)
{
T* obj= NULL;
if(f.isReading())

@ -177,10 +177,10 @@ public:
uint32 getCount() { return _IdCounter; }
// helper serialize a string id as a string
void serial(NLMISC::IStream &f, TSStringId &strId) throw(EStream);
void serial(NLMISC::IStream &f, TSStringId &strId);
// helper serialize a string id vector
void serial(NLMISC::IStream &f, std::vector<TSStringId> &strIdVect) throw(EStream);
void serial(NLMISC::IStream &f, std::vector<TSStringId> &strIdVect);
};

@ -146,7 +146,7 @@ public:
return _LengthR;
}
virtual sint32 getPos () const throw(NLMISC::EStream)
virtual sint32 getPos() const
{
// return (_BufPos - _Buffer.getPtr()) - _SubMessagePosR;
return _Buffer.Pos - _SubMessagePosR;

@ -779,10 +779,10 @@ namespace NLNET
// Init base module, init module name
bool initModule(const TParsedCommandLine &initInfo);
void plugModule(IModuleSocket *moduleSocket) throw (EModuleAlreadyPluggedHere);
void plugModule(IModuleSocket *moduleSocket);
void unplugModule(IModuleSocket *moduleSocket) throw (EModuleNotPluggedHere);
void getPluggedSocketList(std::vector<IModuleSocket*> &resultList);
void invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg) throw (EInvokeFailed);
void invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg);
void _onModuleUp(IModuleProxy *removedProxy);
void _onModuleDown(IModuleProxy *removedProxy);

@ -346,9 +346,9 @@ namespace NLNET
virtual const std::string &getClassName() const =0;
/// The gateway send a command message to the transport
virtual void onCommand(const CMessage &command) throw (EInvalidCommand) = 0;
virtual void onCommand(const CMessage &command) = 0;
/// The gateway send a textual command to the transport
virtual bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand) = 0;
virtual bool onCommand(const TParsedCommandLine &command) = 0;
/// The gateway update the transport regularly
virtual void update() =0;

@ -1328,7 +1328,7 @@ const D3DFORMAT FinalPixelFormat[ITexture::UploadFormatCount][CDriverD3D::FinalP
// ***************************************************************************
bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay)
bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable)
{
H_AUTO_D3D(CDriver3D_setDisplay);

@ -849,7 +849,7 @@ public:
// Mode initialisation, requests
virtual bool init (uintptr_t windowIcon = 0, emptyProc exitFunc = 0);
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay);
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable
virtual bool release();
virtual bool setMode(const GfxMode& mode);
virtual bool getModes(std::vector<GfxMode> &modes);

@ -325,7 +325,7 @@ public:
virtual void disableHardwareVertexArrayAGP();
virtual void disableHardwareTextureShader();
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay);
virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable);
virtual bool setMode(const GfxMode& mode);
virtual bool getModes(std::vector<GfxMode> &modes);
virtual bool getCurrentScreenMode(GfxMode &mode);

@ -611,7 +611,7 @@ void CDriverGL::setWindowIcon(const std::vector<NLMISC::CBitmap> &bitmaps)
}
// --------------------------------------------------
bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable) throw(EBadDisplay)
bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable)
{
H_AUTO_OGL(CDriverGL_setDisplay)

@ -77,7 +77,7 @@ extern IDriver* createGlEsDriverInstance ();
#endif
// ***************************************************************************
IDriver *CDRU::createGlDriver() throw (EDru)
IDriver *CDRU::createGlDriver()
{
#ifdef NL_STATIC
@ -131,7 +131,7 @@ IDriver *CDRU::createGlDriver() throw (EDru)
}
// ***************************************************************************
IDriver *CDRU::createGlEsDriver() throw (EDru)
IDriver *CDRU::createGlEsDriver()
{
#ifdef NL_STATIC
@ -188,7 +188,7 @@ IDriver *CDRU::createGlEsDriver() throw (EDru)
#ifdef NL_OS_WINDOWS
IDriver *CDRU::createD3DDriver() throw (EDru)
IDriver *CDRU::createD3DDriver()
{
#ifdef NL_STATIC

@ -2423,7 +2423,7 @@ void CLandscape::checkZoneBinds(CZone &curZone, EBadBind &bindError)
// ***************************************************************************
void CLandscape::checkBinds() throw(EBadBind)
void CLandscape::checkBinds()
{
EBadBind bindError;
@ -2439,7 +2439,7 @@ void CLandscape::checkBinds() throw(EBadBind)
// ***************************************************************************
void CLandscape::checkBinds(uint16 zoneId) throw(EBadBind)
void CLandscape::checkBinds(uint16 zoneId)
{
EBadBind bindError;

@ -51,7 +51,7 @@ CEventServer CNELU::EventServer;
CEventListenerAsync CNELU::AsyncListener;
bool CNELU::initDriver (uint w, uint h, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d) throw(EDru)
bool CNELU::initDriver (uint w, uint h, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d)
{
// Init debug system
// NLMISC::InitDebug();
@ -183,7 +183,7 @@ void CNELU::releaseDriver()
}
}
bool CNELU::init (uint w, uint h, CViewport viewport, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d) throw(EDru)
bool CNELU::init (uint w, uint h, CViewport viewport, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d)
{
NL3D::registerSerial3d();
if (initDriver(w,h,bpp,windowed,systemWindow,offscreen,direct3d))

@ -88,12 +88,9 @@ namespace NLGUI
addCertificatesFrom("CA");
addCertificatesFrom("AuthRoot");
addCertificatesFrom("ROOT");
#endif
// we manually loaded native CA Certs, don't need to use custom certificates
isUsingOpenSSLBackend = false;
#else
isUsingOpenSSLBackend = true;
#endif
}
else
{
@ -147,7 +144,7 @@ namespace NLGUI
FilesList.push_back(cert);
// look for certificate in search paths
string path = CPath::lookup(cert);
string path = CPath::lookup(cert, false);
nlinfo("Cert path '%s'", path.c_str());
if (path.empty())

@ -1434,7 +1434,7 @@ namespace NLGUI
}
// ***************************************************************************
void CLuaIHM::luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property) throw(ELuaIHMException)
void CLuaIHM::luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property)
{
//H_AUTO(Lua_property_throw)
if(ls.isNil(stackIndex))

@ -222,7 +222,7 @@ namespace NLGUI
}
// *************************************************
CLuaEnumeration CLuaObject::enumerate() throw(ELuaNotATable)
CLuaEnumeration CLuaObject::enumerate()
{
if (!isEnumerable())
{
@ -271,7 +271,7 @@ namespace NLGUI
}
// *************************************************
CLuaObject CLuaObject::at(const char *key) const throw(ELuaNotATable)
CLuaObject CLuaObject::at(const char *key) const
{
if (!isEnumerable()) throw ELuaNotATable(NLMISC::toString("Can't get key '%s' in object '%s' because type is '%s', it is not a table.", key, getId().c_str(), getTypename()).c_str());
return operator[](key);
@ -286,7 +286,7 @@ namespace NLGUI
}
// *************************************************
CLuaObject CLuaObject::newTable(const char *tableName) throw(ELuaNotATable)
CLuaObject CLuaObject::newTable(const char *tableName)
{
nlassert(tableName);
nlassert(isValid());
@ -301,7 +301,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, const CLuaObject &value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, const CLuaObject &value)
{
nlassert(key);
nlassert(isValid());
@ -317,7 +317,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setNil(const char *key) throw(ELuaNotATable)
void CLuaObject::setNil(const char *key)
{
nlassert(key);
nlassert(isValid());
@ -331,7 +331,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, const char *value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, const char *value)
{
nlassert(value);
nlassert(key);
@ -346,13 +346,13 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, const std::string &value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, const std::string &value)
{
setValue(key, value.c_str());
}
// *************************************************
void CLuaObject::setValue(const char *key, bool value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, bool value)
{
nlassert(key);
nlassert(isValid());
@ -366,7 +366,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, TLuaWrappedFunction value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, TLuaWrappedFunction value)
{
nlassert(key);
nlassert(isValid());
@ -380,7 +380,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, double value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, double value)
{
nlassert(key);
nlassert(isValid());
@ -394,7 +394,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, uint32 value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, uint32 value)
{
nlassert(key);
nlassert(isValid());
@ -408,7 +408,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, sint32 value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, sint32 value)
{
nlassert(key);
nlassert(isValid());
@ -422,7 +422,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::setValue(const char *key, sint64 value) throw(ELuaNotATable)
void CLuaObject::setValue(const char *key, sint64 value)
{
nlassert(key);
nlassert(isValid());
@ -436,7 +436,7 @@ namespace NLGUI
}
// *************************************************
void CLuaObject::eraseValue(const char *key) throw(ELuaNotATable)
void CLuaObject::eraseValue(const char *key)
{
nlassert(isValid());
nlassert(key);

@ -401,7 +401,7 @@ bool CIFile::eof ()
}
// ======================================================================================================
void CIFile::serialBuffer(uint8 *buf, uint len) throw(EReadError)
void CIFile::serialBuffer(uint8 *buf, uint len)
{
if (len == 0)
return;
@ -444,7 +444,7 @@ void CIFile::serialBuffer(uint8 *buf, uint len) throw(EReadError)
}
// ======================================================================================================
void CIFile::serialBit(bool &bit) throw(EReadError)
void CIFile::serialBit(bool &bit)
{
// Simple for now.
uint8 v=bit;
@ -453,7 +453,7 @@ void CIFile::serialBit(bool &bit) throw(EReadError)
}
// ======================================================================================================
bool CIFile::seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream)
bool CIFile::seek (sint32 offset, IStream::TSeekOrigin origin) const
{
if ((_CacheFileOnOpen) && (_Cache == NULL))
return false;
@ -485,7 +485,7 @@ bool CIFile::seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStr
}
// ======================================================================================================
sint32 CIFile::getPos () const throw(EStream)
sint32 CIFile::getPos () const
{
return _ReadPos;
}
@ -652,7 +652,7 @@ void COFile::flush()
// ======================================================================================================
void COFile::serialBuffer(uint8 *buf, uint len) throw(EWriteError)
void COFile::serialBuffer(uint8 *buf, uint len)
{
if(!_F)
throw EFileNotOpened(_FileName);
@ -667,14 +667,14 @@ void COFile::serialBuffer(uint8 *buf, uint len) throw(EWriteError)
}
}
// ======================================================================================================
void COFile::serialBit(bool &bit) throw(EWriteError)
void COFile::serialBit(bool &bit)
{
// Simple for now.
uint8 v=bit;
serialBuffer(&v, 1);
}
// ======================================================================================================
bool COFile::seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream)
bool COFile::seek (sint32 offset, IStream::TSeekOrigin origin) const
{
if (_F)
{
@ -701,7 +701,7 @@ bool COFile::seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStr
return false;
}
// ======================================================================================================
sint32 COFile::getPos () const throw(EStream)
sint32 COFile::getPos () const
{
if (_F)
{

@ -107,7 +107,7 @@ void CMemStream::serialBit(bool &bit)
* (to prevent from an "inside serial" to increment it).
* Then a seek(end) would get back to the pointer.
*/
bool CMemStream::seek (sint32 offset, TSeekOrigin origin) const throw(EStream)
bool CMemStream::seek (sint32 offset, TSeekOrigin origin) const
{
switch (origin)
{

@ -211,7 +211,7 @@ void CStaticStringMapper::clear()
}
// ****************************************************************************
void CStaticStringMapper::serial(IStream &f, TSStringId &strId) throw(EStream)
void CStaticStringMapper::serial(IStream &f, TSStringId &strId)
{
std::string tmp;
if (f.isReading())
@ -227,7 +227,7 @@ void CStaticStringMapper::serial(IStream &f, TSStringId &strId) throw(EStream)
}
// ****************************************************************************
void CStaticStringMapper::serial(IStream &f, std::vector<TSStringId> &strIdVect) throw(EStream)
void CStaticStringMapper::serial(IStream &f, std::vector<TSStringId> &strIdVect)
{
std::vector<std::string> vsTmp;
std::string sTmp;

@ -1470,9 +1470,9 @@ uint64 CSystemInfo::availableHDSpace (const string &filename)
uint64 CSystemInfo::availablePhysicalMemory ()
{
#ifdef NL_OS_WINDOWS
MEMORYSTATUS ms;
GlobalMemoryStatus (&ms);
return uint64(ms.dwAvailPhys);
MEMORYSTATUSEX ms;
GlobalMemoryStatusEx(&ms);
return ms.ullAvailPhys;
#elif defined NL_OS_MAC
return uint64(getsysctlnum64("hw.usermem"));
#elif defined NL_OS_UNIX
@ -1485,9 +1485,9 @@ uint64 CSystemInfo::availablePhysicalMemory ()
uint64 CSystemInfo::totalPhysicalMemory ()
{
#ifdef NL_OS_WINDOWS
MEMORYSTATUS ms;
GlobalMemoryStatus (&ms);
return uint64(ms.dwTotalPhys);
MEMORYSTATUSEX ms;
GlobalMemoryStatusEx(&ms);
return ms.ullTotalPhys;
#elif defined NL_OS_MAC
return uint64(getsysctlnum64("hw.physmem"));
#elif defined NL_OS_UNIX
@ -1867,9 +1867,9 @@ bool CSystemInfo::getVideoInfo (std::string &deviceName, uint64 &driverVersion)
uint64 CSystemInfo::virtualMemory ()
{
#ifdef NL_OS_WINDOWS
MEMORYSTATUS ms;
GlobalMemoryStatus (&ms);
return uint64(ms.dwTotalVirtual - ms.dwAvailVirtual);
MEMORYSTATUSEX ms;
GlobalMemoryStatusEx(&ms);
return ms.ullTotalVirtual - ms.ullAvailVirtual;
#else
return 0;
#endif

@ -397,7 +397,7 @@ namespace NLNET
}
void CModuleBase::plugModule(IModuleSocket *moduleSocket) throw (EModuleAlreadyPluggedHere)
void CModuleBase::plugModule(IModuleSocket *moduleSocket)
{
CModuleSocket *sock = dynamic_cast<CModuleSocket*>(moduleSocket);
nlassert(sock != NULL);
@ -415,7 +415,7 @@ namespace NLNET
_ModuleSockets.insert(moduleSocket);
}
void CModuleBase::unplugModule(IModuleSocket *moduleSocket) throw (EModuleNotPluggedHere)
void CModuleBase::unplugModule(IModuleSocket *moduleSocket)
{
CModuleSocket *sock = dynamic_cast<CModuleSocket*>(moduleSocket);
nlassert(sock != NULL);
@ -443,7 +443,7 @@ namespace NLNET
* The call is blocking until receptions of the operation
* result message (or a module down)
*/
void CModuleBase::invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg) throw (EInvokeFailed)
void CModuleBase::invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg)
{
H_AUTO(CModuleBase_invokeModuleOperation);

@ -184,13 +184,13 @@ namespace NLNET
}
}
void onCommand(const CMessage &/* command */) throw (EInvalidCommand)
void onCommand(const CMessage &/* command */)
{
// nothing done for now
throw EInvalidCommand();
}
/// The gateway send a textual command to the transport
bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand)
bool onCommand(const TParsedCommandLine &command)
{
if (command.SubParams.size() < 1)
throw EInvalidCommand();
@ -218,7 +218,7 @@ namespace NLNET
}
/// Open the server by starting listing for incoming connection on the specified port
void openServer(uint16 port) throw (ETransportError)
void openServer(uint16 port)
{
if (_CallbackServer.get() != NULL)
throw ETransportError("openServer : The server is already open");
@ -607,13 +607,13 @@ namespace NLNET
}
}
void onCommand(const CMessage &/* command */) throw (EInvalidCommand)
void onCommand(const CMessage &/* command */)
{
// nothing done for now
throw EInvalidCommand();
}
/// The gateway send a textual command to the transport
bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand)
bool onCommand(const TParsedCommandLine &command)
{
if (command.SubParams.size() < 1)
throw EInvalidCommand();

@ -218,13 +218,13 @@ namespace NLNET
}
}
void onCommand(const CMessage &/* command */) throw (EInvalidCommand)
void onCommand(const CMessage &/* command */)
{
// nothing done for now
throw EInvalidCommand();
}
/// The gateway send a textual command to the transport
bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand)
bool onCommand(const TParsedCommandLine &command)
{
if (command.SubParams.size() < 1)
throw EInvalidCommand();
@ -255,7 +255,7 @@ namespace NLNET
/// Open the server by establishing route with all known services
void open(const std::string &subNetName) throw (ETransportError)
void open(const std::string &subNetName)
{
H_AUTO(L5_open);

@ -186,7 +186,7 @@ public:
*
* \return pointer to new node, or NULL if already inserted
*/
CNode *addNode(const std::string &filenameWithFullPath) throw( NLMISC::Exception);
CNode *addNode(const std::string &filenameWithFullPath);
// remove a node by its index
void removeNode(uint index);
// remove a node by its pointer

@ -56,7 +56,7 @@ public:
CVector Heading;
//CVMatrix Matrix;
public:
void serial(NLMISC::IStream &f) throw(EStream)
void serial(NLMISC::IStream &f)
{
f.serial(Date);
f.serial(Pos);

@ -216,13 +216,13 @@ public:
}
}
void onCommand(const CMessage &/* command */) throw (IGatewayTransport::EInvalidCommand)
void onCommand(const CMessage &/* command */)
{
// nothing done for now
throw EInvalidCommand();
}
/// The gateway send a textual command to the transport
bool onCommand(const TParsedCommandLine &command) throw (IGatewayTransport::EInvalidCommand)
bool onCommand(const TParsedCommandLine &command)
{
if (command.SubParams.size() < 1)
throw EInvalidCommand();
@ -256,7 +256,7 @@ public:
}
/// Open the connection by intercepting client gateway message
void open() throw (ETransportError)
void open()
{
if (_Open)
{

@ -101,7 +101,7 @@ struct EPatchDownloadException : public Exception
{
EPatchDownloadException() : Exception( "Download Error" ) {}
EPatchDownloadException( const std::string& str ) : Exception( str ) {}
virtual ~EPatchDownloadException() throw() {}
virtual ~EPatchDownloadException() {}
};

@ -4370,7 +4370,7 @@ void CEditor::setCurrentTool(CTool *tool)
}
// *********************************************************************************************************
CLuaObject CEditor::getClasses() throw(ELuaError)
CLuaObject CEditor::getClasses()
{
//H_AUTO(R2_getClasses_throw)
CHECK_EDITOR

@ -421,7 +421,7 @@ public:
// get table for registry in lua environment
CLuaObject &getRegistry() { return _Registry; }
// get lua classes (the r2.Classes table)
CLuaObject getClasses() throw(ELuaError);
CLuaObject getClasses();
// get R2 environment (the 'r2' table into lua global environment)
CLuaObject &getEnv();
// get the config table (that is the 'r2.Config' table)

@ -1066,7 +1066,7 @@ void CFightScript::add(CFightScriptCompReader *reader)
}
CFightScriptCompReader *CFightScriptCompReader::getScriptReader (const string &str) throw (ReadFightActionException)
CFightScriptCompReader *CFightScriptCompReader::getScriptReader (const string &str)
{
CFightScript::TFightScriptMap::iterator it=CFightScript::_ScriptCompList.find(str);
if (it==CFightScript::_ScriptCompList.end())

@ -54,7 +54,7 @@ public:
virtual CFightScriptComp *create (const std::string &inStr) throw (ReadFightActionException) = 0;
virtual std::string getName () const =0;
static CFightScriptCompReader *getScriptReader (const std::string &str) throw (ReadFightActionException);
static CFightScriptCompReader *getScriptReader (const std::string &str);
static CFightScriptComp *createScriptComp (const std::string &str) throw (ReadFightActionException);
protected:

@ -1279,7 +1279,7 @@ static void displayErrorLinesForIndex(const string &text, size_t &index)
}
bool CCompiler::getNextToken(const string &text, size_t &index, string &tokenName, string &textValue) throw (EScriptError)
bool CCompiler::getNextToken(const string &text, size_t &index, string &tokenName, string &textValue)
{
char c=text.at(index);
while (c==' '||c=='\n'||c=='\r'||c=='\t') // to avoid blanks, returns and Tabs.

@ -298,7 +298,7 @@ public:
static CToken* getToken (std::string const& tokenName);
static NLMISC::CSmartPtr<CRule> getRule (std::string const& ruleName);
static bool getNextToken (std::string const& text, size_t& index, std::string& tokenName, std::string& textValue) throw (EScriptError);
static bool getNextToken (std::string const& text, size_t& index, std::string& tokenName, std::string& textValue);
static std::string const& getOpcodeName (AIVM::CScriptVM::EOpcode const& op);
static AIVM::CScriptVM::EOpcode getOpcodeAndValue (std::string const& str, std::string& value);
static CScriptNativeFuncParams* getNativeFunc (std::string const& funcName, std::string const& inparams, std::string const& outparams);

@ -394,7 +394,7 @@ void CEntityBase::setTarget( const NLMISC::CEntityId& targetId, bool sendMessage
// lookupStat :
//
//---------------------------------------------------
sint32& CEntityBase::lookupStat( const string& var ) throw (CEntityBase::EInvalidStat)
sint32& CEntityBase::lookupStat( const string& var)
{
// TODO Alain: optimize this...
uint i;
@ -562,7 +562,7 @@ sint32& CEntityBase::lookupStat( const string& var ) throw (CEntityBase::EInvali
// lookupStat for Characteristics:
//
//---------------------------------------------------
sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat)
sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st)
{
if( c < CHARACTERISTICS::NUM_CHARACTERISTICS )
{
@ -601,7 +601,7 @@ sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacter
// lookupStat for Scores:
//
//---------------------------------------------------
sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat)
sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st)
{
if( score < SCORES::NUM_SCORES )
{
@ -640,7 +640,7 @@ sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScore
// lookupStat for Skills:
//
//---------------------------------------------------
sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st ) throw (CEntityBase::EInvalidStat)
sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st)
{
/* enum ESkillSubType
{
@ -675,7 +675,7 @@ sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st
// lookupStat for SpecialModifiers:
//
//---------------------------------------------------
sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw (CEntityBase::EInvalidStat)
sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm)
{
switch( sm )
{
@ -738,7 +738,7 @@ sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw
throw CEntityBase::EInvalidStat() ;
} // lookupStat //
const sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) const throw (CEntityBase::EInvalidStat)
const sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm) const
{
return const_cast<CEntityBase*>(this)->lookupStat(sm);
}

@ -521,36 +521,36 @@ public:
* \param var is the name of the variable
* \return ref on the stat value
*/
sint32& lookupStat( const std::string& stat ) throw (EInvalidStat);
sint32& lookupStat( const std::string& stat);
/**
* get a reference on a characterristics value
* \param c is enum of characteristic, st is enum of subtype of characterisitics (like max, current..)
* \return ref on the stat value
*/
sint32& lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat);
sint32& lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st);
/**
* get a reference on a scores value
* \param score is enum of score, st is enum of subtype of score (like max, current..)
* \return ref on the stat value
*/
sint32& lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat);
sint32& lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st);
/**
* get a reference on a skill value
* \param skill is enum of Skills, st is enum of subtype of skill (like base, current..)
* \return ref on the stat value
*/
sint32& lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st ) throw (CEntityBase::EInvalidStat);
sint32& lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st);
/**
* get a reference on a SpecialModifiers value
* \param sm is enum of SpecialModifiers
* \return ref on the stat value
*/
sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw (CEntityBase::EInvalidStat);
const sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm ) const throw (CEntityBase::EInvalidStat);
sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm);
const sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm) const;
/// accessors on hp (read only)
inline sint32 currentHp() const { return _PhysScores._PhysicalScores[SCORES::hit_points].Current;}

@ -93,7 +93,7 @@ void CItemForSale::setAvailable( bool a )
}
//-----------------------------------------------------------------------------
//void CItemForSale::serial(NLMISC::IStream &f) throw(NLMISC::EStream )
//void CItemForSale::serial(NLMISC::IStream &f)
//{
// f.serial( _PriceInfo );
// f.serial( _RetirePrice );

@ -83,7 +83,7 @@ public:
virtual void setContinent( CONTINENT::TContinent continent ) = 0;
// // serial
// virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream ) = 0;
// virtual void serial(NLMISC::IStream &f) = 0;
// set item for sale
virtual void itemForSale( uint32 price, uint32 retirePrice, CGameItemPtr item, uint32 quantity, const NLMISC::CEntityId& id, CONTINENT::TContinent continent, uint32 identifier ) = 0;
@ -190,7 +190,7 @@ public:
void itemForSale( uint32 price, uint32 retirePrice, CGameItemPtr item, uint32 quantity, const NLMISC::CEntityId& id, CONTINENT::TContinent continent, uint32 identifier );
// serial
// void serial(NLMISC::IStream &f) throw(NLMISC::EStream );
// void serial(NLMISC::IStream &f);
// cast operator
// const IItemTrade * operator = ( CItemForSale * i ) const { return (IItemTrade *) i; }
@ -312,7 +312,7 @@ public:
void setContinent( CONTINENT::TContinent ) {}
// serial
void serial(NLMISC::IStream &f) throw(NLMISC::EStream ) {}
void serial(NLMISC::IStream &f) {}
// set item for sale
void itemForSale( uint32 price, uint32 retirePrice, CGameItemPtr item, uint32 quantity, const NLMISC::CEntityId& id, CONTINENT::TContinent continent, uint32 identifier ) {}

@ -96,7 +96,7 @@ NLMISC::CSmartPtr< IItemTrade > CItemsForSale::removeItem( uint32 identifier, ui
}
//-----------------------------------------------------------------------------
void CItemsForSale::serial(NLMISC::IStream &f) throw(NLMISC::EStream )
void CItemsForSale::serial(NLMISC::IStream &f)
{
// YOYO: we should not be here. OLD serial was very buggy.
// AlainS ensure me this code is no more called (no write, use PDS instead, and old version

@ -55,7 +55,7 @@ public:
const std::vector< TItemTradePtr >& getContent() const { return _ItemsForSale; }
// serial
void serial(NLMISC::IStream &f) throw(NLMISC::EStream );
void serial(NLMISC::IStream &f);
// check coherency between CDynamicItems and CItemsForSale of character, assume CItemsForSale is a reference
void checkSellStore( NLMISC::CEntityId charId );

@ -179,13 +179,13 @@ public:
}
}
void onCommand(const CMessage &command) throw (EInvalidCommand)
void onCommand(const CMessage &command)
{
// nothing done for now
throw EInvalidCommand();
}
/// The gateway send a textual command to the transport
bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand)
bool onCommand(const TParsedCommandLine &command)
{
if (command.SubParams.size() < 1)
throw EInvalidCommand();
@ -212,7 +212,7 @@ public:
}
/// Open the server by intercepting client gateway message
void openServer() throw (ETransportError)
void openServer()
{
if (OpenTransport() != NULL)
throw ETransportError("openServer : a transport is already open !");

@ -145,7 +145,7 @@ public :
* \param gId is the group's id
* \return the group
*/
CChatGroup& getGroup( const TGroupId& gId );// throw (EChatGroup);
CChatGroup& getGroup( const TGroupId& gId );
/**
* Transmit a chat message

@ -65,7 +65,7 @@ public:
return true;
}
public:
void serial(IStream &f) throw(EStream)
void serial(IStream &f)
{
for(uint k = 0; k < NumUserParams; ++k)
{
@ -87,7 +87,7 @@ public:
{
return PSName.empty() && UserParams.empty();
}
void serial(IStream &f) throw(EStream)
void serial(IStream &f)
{
if (!PSName.empty()) writeAtom(f, "PSName", PSName);
UserParams.serial(f);
@ -111,7 +111,7 @@ public:
}
return true;
}
void serial(IStream &f) throw(EStream)
void serial(IStream &f)
{
for(uint k = 0; k < NumFX; ++k)
{

@ -283,7 +283,7 @@ public:
/// The node is in the 'unloaded' state, so caller must load it afterward.
/// NB : no lookup is done, full path must be provided.
/// @return pointer to new node, or NULL if already inserted
CWorkspaceNode *addNode(const std::string &filenameWithFullPath) throw( NLMISC::Exception);
CWorkspaceNode *addNode(const std::string &filenameWithFullPath);
/// Remove a node by it's index
void removeNode(uint index);

Loading…
Cancel
Save