#include <anna/ldap/Attribute.hpp>
class MySession : public ldap::Session {
- void eventResponse (const ldap::Response&) throw (RuntimeException);
+ void eventResponse (const ldap::Response&) noexcept(false);
};
class MyEngine : public ldap::Engine {
private:
Recycler<MySession> a_sessions;
- ldap::Session* allocateSession (const int category) throw () { return a_sessions.create (); }
+ ldap::Session* allocateSession (const int category) { return a_sessions.create (); }
- void releaseSession (ldap::Session* session) throw () {
+ void releaseSession (ldap::Session* session) {
MySession* aux = static_cast <MySession*> (session);
a_sessions.release (aux);
}
MyCommunicator () : comm::Communicator () { ;}
private:
- void eventReceiveMessage (comm::ClientSocket &, const comm::Message&) throw (RuntimeException) {;}
+ void eventReceiveMessage (comm::ClientSocket &, const comm::Message&) noexcept(false) {;}
};
class Buddy : public Clock {
public:
Buddy () : Clock ("buddy", (Millisecond)2000) {;}
- void setLDAPEngine (ldap::Engine& ldapEngine) throw () { a_ldapEngine = &ldapEngine; }
+ void setLDAPEngine (ldap::Engine& ldapEngine) { a_ldapEngine = &ldapEngine; }
private:
ldap::Engine* a_ldapEngine;
ldap::Search a_ldapSearch;
- bool tick () throw (RuntimeException);
+ bool tick () noexcept(false);
};
class Stopper : public Timer {
public:
Stopper () : Timer ("stopper", (Millisecond)0) {;}
- void expire (Engine*) throw (RuntimeException);
+ void expire (Engine*) noexcept(false);
};
class LDAPClient : public anna::comm::Application {
Buddy a_buddy;
Stopper a_stopper;
- void run () throw (RuntimeException);
+ void run () noexcept(false);
};
using namespace std;
// (1) Para evitar la ejecucion de la aplicacion en caso de indicar un valor no valido.
//-----------------------------------------------------------------------------------------
void LDAPClient::run ()
- throw (RuntimeException)
+ noexcept(false)
{
LOGMETHOD (TraceMethod tm ("LDAPClient", "run", ANNA_FILE_LOCATION));
}
void MySession::eventResponse (const ldap::Response& response)
- throw (RuntimeException)
+ noexcept(false)
{
cout << "LDAP Response: " << response.asString () << endl;
cout << " Name: " << response.getName () << endl;
}
bool Buddy::tick ()
- throw (RuntimeException)
+ noexcept(false)
{
CommandLine& cl = CommandLine::instantiate ();
}
void Stopper::expire (Engine*)
- throw (RuntimeException)
+ noexcept(false)
{
LOGMETHOD (TraceMethod tm ("Stopper", "expire", ANNA_FILE_LOCATION));