Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout changes #224

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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