Skip to content

Commit

Permalink
Layout changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillemsen committed Jun 29, 2022
1 parent b3a2910 commit 02d5013
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 deletions.
25 changes: 10 additions & 15 deletions examples/ami/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ parse_args (int argc, ACE_TCHAR *argv[])
return true;
}

class Handler
:public virtual CORBA::amic_traits<Test::A>::replyhandler_base_type
class Handler : public virtual CORBA::amic_traits<Test::A>::replyhandler_base_type
{
public:
/// Constructor.
Handler () = default;

/// Destructor.
~Handler () = default;
~Handler () override = default;

void foo (int32_t ami_return_val) override
{
Expand All @@ -63,8 +62,7 @@ class Handler
}
}

void foo_excep (
IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
void foo_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
{
taox11_info << "Callback method <foo_excep> called."<< std::endl;
}
Expand All @@ -76,8 +74,7 @@ class Handler
<< std::endl;
}

void get_yadda_excep (
IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
void get_yadda_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
{
taox11_info << "Callback method <get_yadda_excep> called." << std::endl;
}
Expand All @@ -87,8 +84,7 @@ class Handler
taox11_info << "Callback method <set_yadda> called:"<< std::endl;
}

void set_yadda_excep (
IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
void set_yadda_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
{
taox11_info << "Callback method <set_yadda_excep> called." << std::endl;
}
Expand All @@ -97,8 +93,7 @@ class Handler
{
}

void shutdown_excep (
IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
void shutdown_excep (IDL::traits< ::Messaging::ExceptionHolder>::ref_type) override
{
}
};
Expand Down Expand Up @@ -337,9 +332,9 @@ int main(int argc, char* argv[])
_orb->destroy ();
}
catch (const std::exception& e)
{
taox11_error << "exception caught: " << e << std::endl;
return 1;
}
{
taox11_error << "exception caught: " << e << std::endl;
return 1;
}
return result;
}
5 changes: 2 additions & 3 deletions examples/ami/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ main(int argc, ACE_TCHAR *argv[])
{
IDL::traits<CORBA::ORB>::ref_type _orb = CORBA::ORB_init (argc, argv);

if (_orb == nullptr)
if (!_orb)
{
taox11_error
<< "ERROR: CORBA::ORB_init (argc, argv) returned null ORB."
Expand Down Expand Up @@ -71,7 +71,6 @@ main(int argc, ACE_TCHAR *argv[])
CORBA::servant_traits<Test::A>::ref_type a_impl =
CORBA::make_reference<A_i> (_orb);


taox11_info << "created Test::A servant" << std::endl;

PortableServer::ObjectId id = root_poa->activate_object (a_impl);
Expand All @@ -81,7 +80,7 @@ main(int argc, ACE_TCHAR *argv[])
IDL::traits<CORBA::Object>::ref_type a_obj =
root_poa->id_to_reference (id);

if (a_obj == nullptr)
if (!a_obj)
{
taox11_error
<< "ERROR: root_poa->id_to_reference (id) returned null reference."
Expand Down
4 changes: 1 addition & 3 deletions examples/ami/test_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@

#include "testS.h"

class A_i
: public virtual CORBA::servant_traits<Test::A>::base_type
class A_i : public virtual CORBA::servant_traits<Test::A>::base_type
{
public:
/// ctor
A_i (IDL::traits<CORBA::ORB>::ref_type orb);

// The methods of interface A.
Expand Down

0 comments on commit 02d5013

Please sign in to comment.