summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlabancap <labancap@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-22 19:41:22 +0000
committerlabancap <labancap@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-22 19:41:22 +0000
commitc998c61d556c7c941414b090e61f6546c16d984e (patch)
tree7becc64c2364ad2cce6dbc1fc776dde64d90d239
parentbec1a13d4ef9818aa41e2812a7194cff6d3be3b1 (diff)
downloadATCD-c998c61d556c7c941414b090e61f6546c16d984e.tar.gz
Additional ACE Development Guidelines conformance updates in preparation for merge.
-rw-r--r--TAO/OCI_RE_ChangeLog22
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp15
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_ReaderWriter.cpp12
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp35
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h25
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp32
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.h12
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp12
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp73
-rw-r--r--TAO/tao/Storable_Base.h10
-rw-r--r--TAO/tao/Storable_Base.inl4
-rw-r--r--TAO/tao/Storable_File_Guard.cpp40
-rw-r--r--TAO/tao/Storable_FlatFileStream.cpp117
-rw-r--r--TAO/tao/Storable_FlatFileStream.h6
14 files changed, 245 insertions, 170 deletions
diff --git a/TAO/OCI_RE_ChangeLog b/TAO/OCI_RE_ChangeLog
index 0499bb5e9dd..9f53bc32b45 100644
--- a/TAO/OCI_RE_ChangeLog
+++ b/TAO/OCI_RE_ChangeLog
@@ -1,3 +1,25 @@
+Tue Jan 22 19:37:57 UTC 2013 Phillip LaBanca <labancap@ociweb.com>
+
+ * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp:
+
+ * orbsvcs/orbsvcs/Naming/Storable_Naming_Context_ReaderWriter.cpp:
+
+ * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h:
+ * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp:
+ * orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.h:
+ * orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp:
+ * orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp:
+ * orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp:
+
+ * tao/Storable_Base.h:
+ * tao/Storable_Base.inl:
+ * tao/Storable_File_Guard.cpp:
+ * tao/Storable_FlatFileStream.h:
+ * tao/Storable_FlatFileStream.cpp:
+
+ Additional ACE Development Guidelines conformance updates in
+ preparation for merge.
+
Tue Jan 22 15:12:59 UTC 2013 Kevin Stanley <stanleyk@ociweb.com>
* utils/logWalker/GIOP_Buffer.h:
diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp
index bfa53b5234e..f86ffb96e0f 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp
@@ -49,7 +49,7 @@ TAO_FT_Naming_Replication_Manager::register_replica (
::FT_Naming::ReplicationManager_ptr replica,
const ::FT_Naming::ReplicaInfo & replica_info)
{
- ACE_TRACE ("TAO_FT_Naming_Replication_Manager::register_replica");
+ ACE_TRACE ( ACE_TEXT("TAO_FT_Naming_Replication_Manager::register_replica"));
ACE_GUARD_THROW_EX (ACE_SYNCH_MUTEX,
ace_mon,
@@ -79,7 +79,8 @@ void
TAO_FT_Naming_Replication_Manager::notify_updated_object_group (
const FT_Naming::ObjectGroupUpdate & group_info)
{
- ACE_TRACE ("TAO_FT_Naming_Replication_Manager::notify_updated_object_group");
+ ACE_TRACE ( ACE_TEXT ("TAO_FT_Naming_Replication_Manager::")
+ ACE_TEXT ("notify_updated_object_group"));
// Make sure that we have a valid naming server
ACE_ASSERT (naming_svr_);
@@ -94,7 +95,8 @@ void
TAO_FT_Naming_Replication_Manager::notify_updated_context (
const FT_Naming::NamingContextUpdate & context_info)
{
- ACE_TRACE ("TAO_FT_Naming_Replication_Manager::notify_updated_context");
+ ACE_TRACE (ACE_TEXT ("TAO_FT_Naming_Replication_Manager::")
+ ACE_TEXT ("notify_updated_context"));
ACE_ASSERT (naming_svr_);
int result = this->naming_svr_->update_naming_context (context_info);
@@ -108,7 +110,7 @@ TAO_FT_Naming_Replication_Manager::notify_updated_context (
FT_Naming::ReplicationManager_ptr
TAO_FT_Naming_Replication_Manager::peer_replica (void)
{
- ACE_TRACE ("TAO_FT_Naming_Replication_Manager::peer_replica");
+ ACE_TRACE (ACE_TEXT ("TAO_FT_Naming_Replication_Manager::peer_replica"));
// Return a copy of the stored peer to the requester
return FT_Naming::ReplicationManager::_duplicate (peer_replica_.in ());
}
@@ -119,7 +121,8 @@ TAO_FT_Naming_Replication_Manager::register_with_peer_replica (
CosNaming::NamingContext_ptr nc,
FT_Naming::NamingManager_ptr nm)
{
- ACE_TRACE ("TAO_FT_Naming_Replication_Manager::register_with_peer_replica");
+ ACE_TRACE (ACE_TEXT ("TAO_FT_Naming_Replication_Manager::")
+ ACE_TEXT ("register_with_peer_replica"));
int result = 0;
FT_Naming::ReplicaInfo my_info;
@@ -171,6 +174,6 @@ TAO_FT_Naming_Replication_Manager::register_with_peer_replica (
FT_Naming::ReplicationManager_ptr
TAO_FT_Naming_Replication_Manager::reference (void)
{
- ACE_TRACE("TAO_FT_Naming_Replication_Manager::reference");
+ ACE_TRACE (ACE_TEXT ("TAO_FT_Naming_Replication_Manager::reference"));
return FT_Naming::ReplicationManager::_duplicate (reference_.in ());
}
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_ReaderWriter.cpp b/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_ReaderWriter.cpp
index 91abe2ed650..c00934536f0 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_ReaderWriter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_ReaderWriter.cpp
@@ -220,7 +220,8 @@ TAO_Storable_Naming_Context_ReaderWriter::read_header (
}
void
-TAO_Storable_Naming_Context_ReaderWriter::write_record (const TAO_NS_Persistence_Record & record)
+TAO_Storable_Naming_Context_ReaderWriter::write_record (
+ const TAO_NS_Persistence_Record & record)
{
TAO_NS_Persistence_Record::Record_Type type = record.type ();
stream_ << type;
@@ -233,7 +234,8 @@ TAO_Storable_Naming_Context_ReaderWriter::write_record (const TAO_NS_Persistence
}
void
-TAO_Storable_Naming_Context_ReaderWriter::read_record (TAO_NS_Persistence_Record & record)
+TAO_Storable_Naming_Context_ReaderWriter::read_record (
+ TAO_NS_Persistence_Record & record)
{
int temp_type_in;
stream_ >> temp_type_in;
@@ -255,7 +257,8 @@ TAO_Storable_Naming_Context_ReaderWriter::read_record (TAO_NS_Persistence_Record
}
void
-TAO_Storable_Naming_Context_ReaderWriter::write_global (const TAO_NS_Persistence_Global & global)
+TAO_Storable_Naming_Context_ReaderWriter::write_global (
+ const TAO_NS_Persistence_Global & global)
{
stream_.rewind ();
stream_ << global.counter ();
@@ -263,7 +266,8 @@ TAO_Storable_Naming_Context_ReaderWriter::write_global (const TAO_NS_Persistence
}
void
-TAO_Storable_Naming_Context_ReaderWriter::read_global (TAO_NS_Persistence_Global & global)
+TAO_Storable_Naming_Context_ReaderWriter::read_global (
+ TAO_NS_Persistence_Global & global)
{
unsigned int counter = 0;
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
index 2d6bd033b6c..3ea3d1ee299 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
@@ -54,7 +54,7 @@ TAO::PG_Group_Factory::PG_Group_Factory ()
, orb_ (CORBA::ORB::_nil())
, poa_ (PortableServer::POA::_nil())
, manipulator_ ()
- , domain_id_ ("default-domain")
+ , domain_id_ (ACE_TEXT_ALWAYS_CHAR ("default-domain"))
, groups_read_ (false)
, storable_factory_ (0)
{
@@ -86,7 +86,9 @@ void TAO::PG_Group_Factory::init (
this->orb_ = CORBA::ORB::_duplicate(orb);
this->poa_ = PortableServer::POA::_duplicate (poa);
- this->factory_registry_ = PortableGroup::FactoryRegistry::_duplicate (factory_registry);
+
+ this->factory_registry_ =
+ PortableGroup::FactoryRegistry::_duplicate (factory_registry);
ACE_ASSERT (!CORBA::is_nil (this->orb_.in ()));
@@ -177,7 +179,8 @@ TAO::PG_Object_Group * TAO::PG_Group_Factory::create_group (
return objectGroup;
}
-void TAO::PG_Group_Factory::delete_group (PortableGroup::ObjectGroup_ptr object_group)
+void TAO::PG_Group_Factory::delete_group (
+ PortableGroup::ObjectGroup_ptr object_group)
{
if (! destroy_group (object_group))
{
@@ -186,7 +189,8 @@ void TAO::PG_Group_Factory::delete_group (PortableGroup::ObjectGroup_ptr object_
}
-void TAO::PG_Group_Factory::delete_group (PortableGroup::ObjectGroupId group_id)
+void TAO::PG_Group_Factory::delete_group (
+ PortableGroup::ObjectGroupId group_id)
{
if (! destroy_group (group_id))
{
@@ -200,17 +204,20 @@ int TAO::PG_Group_Factory::insert_group ( ::TAO::PG_Object_Group * group)
return insert_group (group->get_object_group_id(), group);
}
-int TAO::PG_Group_Factory::insert_group (PortableGroup::ObjectGroupId group_id, ::TAO::PG_Object_Group * group)
+int TAO::PG_Group_Factory::insert_group (PortableGroup::ObjectGroupId group_id,
+ ::TAO::PG_Object_Group * group)
{
return (this->get_group_map ().bind (group_id, group) == 0);
}
-int TAO::PG_Group_Factory::find_group (PortableGroup::ObjectGroupId group_id, ::TAO::PG_Object_Group *& group)
+int TAO::PG_Group_Factory::find_group (PortableGroup::ObjectGroupId group_id,
+ ::TAO::PG_Object_Group *& group)
{
return (this->get_group_map ().find (group_id , group) == 0);
}
-int TAO::PG_Group_Factory::find_group (PortableGroup::ObjectGroup_ptr object_group, ::TAO::PG_Object_Group *& group)
+int TAO::PG_Group_Factory::find_group (PortableGroup::ObjectGroup_ptr object_group,
+ ::TAO::PG_Object_Group *& group)
{
int result = 0;
PortableGroup::TagGroupTaggedComponent tc;
@@ -256,7 +263,8 @@ int TAO::PG_Group_Factory::destroy_group (PortableGroup::ObjectGroupId group_id)
{
if (this->use_persistence_)
{
- PG_Object_Group_Storable *og = dynamic_cast<PG_Object_Group_Storable *> (group);
+ PG_Object_Group_Storable *og =
+ dynamic_cast<PG_Object_Group_Storable *> (group);
og->set_destroyed (true);
result = (this->list_store_->remove (group->get_object_group_id ())
== 0);
@@ -333,7 +341,8 @@ TAO::PG_Group_Factory::all_groups (void)
}
void
-TAO::PG_Group_Factory::set_object_group_storable_factory (TAO::Storable_Factory * factory)
+TAO::PG_Group_Factory::set_object_group_storable_factory (
+ TAO::Storable_Factory * factory)
{
this->use_persistence_ = true;
this->storable_factory_ = factory;
@@ -357,13 +366,15 @@ TAO::PG_Group_Factory::get_group_map ()
// Extract IDs from group_map_ to set for comparison with IDs in persistent store
// This is to avoid having to repopulate the map from scratch.
PG_Group_List_Store::Group_Ids map_ids;
- for (Group_Map_Iterator it = group_map_.begin (); it != group_map_.end (); ++it)
+ for (Group_Map_Iterator it = group_map_.begin ();
+ it != group_map_.end (); ++it)
{
map_ids.insert (it->key ());
}
// Get the latest groups from persistent store
- const PG_Group_List_Store::Group_Ids & persistent_ids = list_store_->get_group_ids ();
+ const PG_Group_List_Store::Group_Ids & persistent_ids =
+ list_store_->get_group_ids ();
// Find groups added since map was last updated
PG_Group_List_Store::Group_Ids groups_added;
@@ -375,7 +386,7 @@ TAO::PG_Group_Factory::get_group_map ()
// Bind added groups
for (PG_Group_List_Store::Group_Id_Const_Iterator it = groups_added.begin ();
- it != groups_added.end (); ++it)
+ it != groups_added.end (); ++it)
{
PortableGroup::ObjectGroupId group_id = *it;
TAO::PG_Object_Group * objectGroup = 0;
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h
index f80cd71becb..540d2bcd3b8 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h
@@ -23,7 +23,6 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "orbsvcs/PortableGroup/PG_Object_Group_Manipulator.h"
-
#include "orbsvcs/PortableGroupC.h"
#include "tao/PortableServer/PortableServer.h"
@@ -57,14 +56,16 @@ namespace TAO
{
////////////////////////////////////////////////////////////
// typedef private implementation classes
- typedef ACE_Hash_Map_Manager_Ex<
+ typedef ACE_Hash_Map_Manager_Ex <
PortableGroup::ObjectGroupId,
::TAO::PG_Object_Group *,
ACE_Hash<ACE_UINT64>,
ACE_Equal_To<ACE_UINT64>,
TAO_SYNCH_MUTEX> Group_Map;
- typedef ACE_Hash_Map_Entry <PortableGroup::ObjectGroupId, ::TAO::PG_Object_Group *> Group_Map_Entry;
+ typedef ACE_Hash_Map_Entry <
+ PortableGroup::ObjectGroupId,
+ ::TAO::PG_Object_Group *> Group_Map_Entry;
typedef ACE_Hash_Map_Iterator_Ex <
PortableGroup::ObjectGroupId,
@@ -114,32 +115,40 @@ namespace TAO
* note: uses group id extracted from group object
* @return bool true if insertion successful
*/
- int insert_group ( ::TAO::PG_Object_Group * group);
+ int insert_group (::TAO::PG_Object_Group * group);
/**
* insert group. Take ownership
* @return bool true if insertion successful
*/
- int insert_group (PortableGroup::ObjectGroupId group_id, ::TAO::PG_Object_Group * group);
+ int insert_group (
+ PortableGroup::ObjectGroupId group_id,
+ ::TAO::PG_Object_Group * group);
/**
* find group
* @return bool true if found
*/
- int find_group (PortableGroup::ObjectGroupId group_id, ::TAO::PG_Object_Group *& group);
+ int find_group (
+ PortableGroup::ObjectGroupId group_id,
+ ::TAO::PG_Object_Group *& group);
/**
* find group
* note: uses group id extracted from object_group
* @return bool true if found
*/
- int find_group (PortableGroup::ObjectGroup_ptr object_group, ::TAO::PG_Object_Group *& group);
+ int find_group (
+ PortableGroup::ObjectGroup_ptr object_group,
+ ::TAO::PG_Object_Group *& group);
/**
* find group with the property with the designated value
* @return bool true if found
*/
- int find_group_with_name (const char* group_name, ::TAO::PG_Object_Group *& group);
+ int find_group_with_name (
+ const char* group_name,
+ ::TAO::PG_Object_Group *& group);
/**
* remove group from map and delete it.
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp
index a9eb1a31ce5..bdec70e6bc9 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp
@@ -26,7 +26,8 @@ namespace TAO
class PG_Group_List_Store_File_Guard : public TAO::Storable_File_Guard
{
public:
- PG_Group_List_Store_File_Guard ( PG_Group_List_Store & list_store, const char * mode);
+ PG_Group_List_Store_File_Guard ( PG_Group_List_Store & list_store,
+ const char * mode);
~PG_Group_List_Store_File_Guard ();
@@ -50,9 +51,10 @@ private:
};
}
-TAO::PG_Group_List_Store_File_Guard::PG_Group_List_Store_File_Guard (PG_Group_List_Store & list_store, const char * mode)
- : TAO::Storable_File_Guard(true)
- , list_store_(list_store)
+TAO::PG_Group_List_Store_File_Guard::PG_Group_List_Store_File_Guard (
+ PG_Group_List_Store & list_store, const char * mode)
+ : TAO::Storable_File_Guard(true),
+ list_store_(list_store)
{
this->init(mode);
}
@@ -63,7 +65,8 @@ TAO::PG_Group_List_Store_File_Guard::~PG_Group_List_Store_File_Guard ()
}
void
-TAO::PG_Group_List_Store_File_Guard::set_object_last_changed (const time_t & time)
+TAO::PG_Group_List_Store_File_Guard::set_object_last_changed (
+ const time_t & time)
{
list_store_.last_changed_ = time;
}
@@ -111,7 +114,8 @@ TAO::PG_Group_List_Store_File_Guard::create_stream (const char * mode)
typedef TAO::PG_Group_List_Store_File_Guard File_Guard;
-TAO::PG_Group_List_Store::PG_Group_List_Store (Storable_Factory & storable_factory)
+TAO::PG_Group_List_Store::PG_Group_List_Store (
+ Storable_Factory & storable_factory)
: next_group_id_ (0)
, storable_factory_ (storable_factory)
, loaded_from_stream_ (false)
@@ -122,18 +126,20 @@ TAO::PG_Group_List_Store::PG_Group_List_Store (Storable_Factory & storable_facto
// version already exists.
bool stream_exists = false;
{
- ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r"));
+ ACE_Auto_Ptr<TAO::Storable_Base> stream (
+ this->create_stream (ACE_TEXT_ALWAYS_CHAR ("r")));
+
if (stream->exists ())
stream_exists = true;
}
if (stream_exists)
{
- File_Guard fg(*this, "r");
+ File_Guard fg(*this, ACE_TEXT_ALWAYS_CHAR ("r"));
}
else
{
- File_Guard fg(*this, "wc");
+ File_Guard fg(*this, ACE_TEXT_ALWAYS_CHAR ("wc"));
this->write (fg.peer ());
}
}
@@ -183,7 +189,7 @@ TAO::PG_Group_List_Store::remove (PortableGroup::ObjectGroupId id)
TAO::PG_Group_List_Store::Group_Ids &
TAO::PG_Group_List_Store::get_group_ids ()
{
- File_Guard fg(*this, "r");
+ File_Guard fg(*this, ACE_TEXT_ALWAYS_CHAR ("r"));
return group_ids_;
}
@@ -229,7 +235,8 @@ TAO::PG_Group_List_Store::write (TAO::Storable_Base & stream)
int size = group_ids_.size ();
stream << size;
- for (Group_Id_Const_Iterator it = group_ids_.begin (); it != group_ids_.end (); ++it)
+ for (Group_Id_Const_Iterator it = group_ids_.begin ();
+ it != group_ids_.end (); ++it)
{
int group_id = static_cast<int> (*it);
stream << group_id;
@@ -241,7 +248,8 @@ TAO::PG_Group_List_Store::write (TAO::Storable_Base & stream)
TAO::Storable_Base *
TAO::PG_Group_List_Store::create_stream (const char * mode)
{
- return this->storable_factory_.create_stream ("ObjectGroup_global", mode);
+ return this->storable_factory_.create_stream (
+ ACE_TEXT_ALWAYS_CHAR ("ObjectGroup_global"), mode);
}
bool
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.h
index 6fbdcdbfe44..8801ec6598d 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.h
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.h
@@ -61,9 +61,15 @@ namespace TAO
int remove (PortableGroup::ObjectGroupId id);
typedef std::set<PortableGroup::ObjectGroupId> Group_Ids;
- typedef std::set<PortableGroup::ObjectGroupId>::iterator Group_Id_Iterator;
- typedef std::set<PortableGroup::ObjectGroupId>::reverse_iterator Group_Id_Revers_Iterator;
- typedef std::set<PortableGroup::ObjectGroupId>::const_iterator Group_Id_Const_Iterator;
+
+ typedef std::set<PortableGroup::ObjectGroupId>::iterator
+ Group_Id_Iterator;
+
+ typedef std::set<PortableGroup::ObjectGroupId>::reverse_iterator
+ Group_Id_Revers_Iterator;
+
+ typedef std::set<PortableGroup::ObjectGroupId>::const_iterator
+ Group_Id_Const_Iterator;
Group_Ids & get_group_ids ();
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
index c53cac7b1d3..33ce7d67bb5 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
@@ -316,8 +316,8 @@ TAO::PG_Object_Group::set_primary_member (
{
int cleared = 0;
this->primary_location_ = the_location;
- for (MemberMap_Iterator it = this->members_.begin();
- !cleared && it != this->members_.end();
+ for (MemberMap_Iterator it = this->members_.begin ();
+ !cleared && it != this->members_.end ();
++it)
{
cleared = (*it).int_id_->is_primary_;
@@ -383,7 +383,7 @@ TAO::PG_Object_Group::remove_member (
MemberInfo * info = 0;
if (this->members_.unbind (the_location, info) == 0)
{
- if (this->members_.current_size() > 0)
+ if (this->members_.current_size () > 0)
{
this->reference_ =
this->manipulator_.remove_profiles (this->reference_.in (),
@@ -398,7 +398,7 @@ TAO::PG_Object_Group::remove_member (
if (the_location == this->primary_location_)
{
- this->primary_location_.length(0);
+ this->primary_location_.length (0);
}
if (this->increment_version ())
@@ -412,8 +412,8 @@ TAO::PG_Object_Group::remove_member (
if (TAO_debug_level > 6)
{
ACE_DEBUG ((LM_DEBUG,
- "TAO-PG (%P|%t) - "
- "remove_member throwing MemberNotFound.\n"
+ ACE_TEXT ("TAO-PG (%P|%t) - ")
+ ACE_TEXT ("remove_member throwing MemberNotFound.\n")
));
}
throw PortableGroup::MemberNotFound();
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp
index 578aa059f09..dc571b4ff25 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp
@@ -23,7 +23,7 @@ namespace
char *tmp = 0;
ACE_NEW_THROW_EX (tmp, char [size], CORBA::NO_MEMORY ());
- ACE_Auto_Basic_Array_Ptr<char> buf(tmp);
+ ACE_Auto_Basic_Array_Ptr<char> buf (tmp);
stream.read (size, buf.get ());
if (!stream.good ())
{
@@ -79,8 +79,9 @@ namespace TAO
}
-TAO::Object_Group_File_Guard::Object_Group_File_Guard ( TAO::PG_Object_Group_Storable & object_group,
- const char *mode)
+TAO::Object_Group_File_Guard::Object_Group_File_Guard (
+ TAO::PG_Object_Group_Storable & object_group,
+ const char *mode)
: TAO::Storable_File_Guard(true)
, object_group_(object_group)
{
@@ -170,18 +171,20 @@ TAO::PG_Object_Group_Storable::PG_Object_Group_Storable (
// version already exists.
bool stream_exists = false;
{
- ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r"));
+ ACE_Auto_Ptr<TAO::Storable_Base> stream (
+ this->create_stream (ACE_TEXT_ALWAYS_CHAR ("r")));
+
if (stream->exists ())
stream_exists = true;
}
if (stream_exists)
{
- Object_Group_File_Guard fg (*this, "r");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("r"));
}
else
{
- Object_Group_File_Guard fg (*this, "wc");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("wc"));
this->write (fg.peer ());
}
}
@@ -207,14 +210,16 @@ TAO::PG_Object_Group_Storable::PG_Object_Group_Storable (
// version already exists.
bool stream_exists = false;
{
- ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r"));
+ ACE_Auto_Ptr<TAO::Storable_Base> stream (
+ this->create_stream (ACE_TEXT_ALWAYS_CHAR ("r")));
+
if (stream->exists ())
stream_exists = true;
}
if (stream_exists)
{
- Object_Group_File_Guard fg (*this, "r");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("r"));
}
else
{
@@ -226,7 +231,9 @@ TAO::PG_Object_Group_Storable::~PG_Object_Group_Storable (void)
{
if (destroyed_)
{
- ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r"));
+ ACE_Auto_Ptr<TAO::Storable_Base> stream (
+ this->create_stream (ACE_TEXT_ALWAYS_CHAR ("r")));
+
if (stream->exists ())
{
stream->remove ();
@@ -245,26 +252,27 @@ TAO::PG_Object_Group_Storable::set_destroyed (bool destroyed)
const PortableGroup::Location &
TAO::PG_Object_Group_Storable::get_primary_location (void)
{
- Object_Group_File_Guard fg (*this, "r");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("r"));
return TAO::PG_Object_Group::get_primary_location ();
}
void
-TAO::PG_Object_Group_Storable::add_member (const PortableGroup::Location & the_location,
- CORBA::Object_ptr member)
+TAO::PG_Object_Group_Storable::add_member (
+ const PortableGroup::Location & the_location,
+ CORBA::Object_ptr member)
{
- Object_Group_File_Guard fg (*this, "rw");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("rw"));
PG_Object_Group::add_member (the_location, member);
this->write (fg.peer ());
}
int
TAO::PG_Object_Group_Storable::set_primary_member (
- TAO_IOP::TAO_IOR_Property * prop,
- const PortableGroup::Location & the_location)
+ TAO_IOP::TAO_IOR_Property * prop,
+ const PortableGroup::Location & the_location)
{
- Object_Group_File_Guard fg (*this, "rw");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("rw"));
int primary_member = PG_Object_Group::set_primary_member (prop, the_location);
this->write (fg.peer ());
return primary_member;
@@ -272,9 +280,9 @@ TAO::PG_Object_Group_Storable::set_primary_member (
void
TAO::PG_Object_Group_Storable::remove_member (
- const PortableGroup::Location & the_location)
+ const PortableGroup::Location & the_location)
{
- Object_Group_File_Guard fg (*this, "rw");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("rw"));
PG_Object_Group::remove_member (the_location);
this->write (fg.peer ());
}
@@ -283,17 +291,17 @@ TAO::PG_Object_Group_Storable::remove_member (
PortableGroup::Locations *
TAO::PG_Object_Group_Storable::locations_of_members (void)
{
- Object_Group_File_Guard fg (*this, "r");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("r"));
return PG_Object_Group::locations_of_members ();
}
void
TAO::PG_Object_Group_Storable::create_member (
- const PortableGroup::Location & the_location,
- const char * type_id,
- const PortableGroup::Criteria & the_criteria)
+ const PortableGroup::Location & the_location,
+ const char * type_id,
+ const PortableGroup::Criteria & the_criteria)
{
- Object_Group_File_Guard fg (*this, "rw");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("rw"));
PG_Object_Group::create_member (the_location,
type_id,
the_criteria);
@@ -303,7 +311,7 @@ TAO::PG_Object_Group_Storable::create_member (
void
TAO::PG_Object_Group_Storable::set_name (const char* group_name)
{
- Object_Group_File_Guard fg (*this, "rw");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("rw"));
PG_Object_Group::set_name (group_name);
this->write (fg.peer ());
}
@@ -332,16 +340,17 @@ TAO::PG_Object_Group_Storable::minimum_populate (void)
}
int
-TAO::PG_Object_Group_Storable::has_member_at (const PortableGroup::Location & location)
+TAO::PG_Object_Group_Storable::has_member_at (
+ const PortableGroup::Location & location)
{
- Object_Group_File_Guard fg (*this, "r");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("r"));
return PG_Object_Group::has_member_at (location);
}
void
TAO::PG_Object_Group_Storable::distribute (int value)
{
- Object_Group_File_Guard fg (*this, "rw");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("rw"));
PG_Object_Group::distribute (value);
this->write (fg.peer ());
}
@@ -350,7 +359,7 @@ CORBA::Object_ptr
TAO::PG_Object_Group_Storable::get_member_reference (
const PortableGroup::Location & the_location)
{
- Object_Group_File_Guard fg (*this, "r");
+ Object_Group_File_Guard fg (*this, ACE_TEXT_ALWAYS_CHAR ("r"));
return PG_Object_Group::get_member_reference (the_location);
}
@@ -371,7 +380,7 @@ TAO::PG_Object_Group_Storable::create_stream (const char * mode)
// to long long int, make ID type explicit to avoid
// GNU C++ warning on sprintf statement.
long long int id = this->get_object_group_id ();
- ACE_OS::sprintf (file_name, "ObjectGroup_%lld", id);
+ ACE_OS::sprintf (file_name, ACE_TEXT_ALWAYS_CHAR ("ObjectGroup_%lld"), id);
return this->storable_factory_.create_stream (file_name, mode);
}
@@ -487,7 +496,7 @@ TAO::PG_Object_Group_Storable::read (TAO::Storable_Base & stream)
}
MemberInfo * info = 0;
- ACE_NEW_THROW_EX (info, MemberInfo(member.in(),
+ ACE_NEW_THROW_EX (info, MemberInfo(member.in (),
the_location,
factory,
factory_id),
@@ -513,7 +522,7 @@ TAO::PG_Object_Group_Storable::write (TAO::Storable_Base & stream)
stream << this->role_;
TAO_OutputCDR primary_location_cdr;
- primary_location_cdr << PG_Object_Group::get_primary_location();
+ primary_location_cdr << PG_Object_Group::get_primary_location ();
stream << primary_location_cdr;
ACE_CString reference_ior = this->orb_->object_to_string (this->reference_.in ());
@@ -530,7 +539,7 @@ TAO::PG_Object_Group_Storable::write (TAO::Storable_Base & stream)
TAO_OutputCDR properties_cdr;
PortableGroup::Criteria properties;
- this->properties_.export_properties(properties);
+ this->properties_.export_properties (properties);
properties_cdr << properties;
stream << properties_cdr;
diff --git a/TAO/tao/Storable_Base.h b/TAO/tao/Storable_Base.h
index c4105dde42f..5fb3e002391 100644
--- a/TAO/tao/Storable_Base.h
+++ b/TAO/tao/Storable_Base.h
@@ -32,13 +32,13 @@ namespace TAO
class TAO_Export Storable_Base
{
public:
- Storable_Base();
+ Storable_Base ();
- virtual ~Storable_Base();
+ virtual ~Storable_Base ();
- virtual void remove() = 0;
+ virtual void remove () = 0;
- virtual int exists() = 0;
+ virtual int exists () = 0;
virtual int open () = 0;
@@ -48,7 +48,7 @@ namespace TAO
virtual int funlock (int whence, int start, int len) = 0;
- virtual time_t last_changed(void) = 0;
+ virtual time_t last_changed (void) = 0;
// Mimic a portion of the std::ios interface. We need to be able
// to indicate error states from the extraction operators below.
diff --git a/TAO/tao/Storable_Base.inl b/TAO/tao/Storable_Base.inl
index 105e4a9b48b..6f43f722b01 100644
--- a/TAO/tao/Storable_Base.inl
+++ b/TAO/tao/Storable_Base.inl
@@ -17,13 +17,13 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
-TAO::Storable_Base::Storable_Base()
+TAO::Storable_Base::Storable_Base ()
: state_ (goodbit)
{
}
ACE_INLINE
-TAO::Storable_Base::~Storable_Base()
+TAO::Storable_Base::~Storable_Base ()
{
}
diff --git a/TAO/tao/Storable_File_Guard.cpp b/TAO/tao/Storable_File_Guard.cpp
index 6d4096f8240..3c7139d3e71 100644
--- a/TAO/tao/Storable_File_Guard.cpp
+++ b/TAO/tao/Storable_File_Guard.cpp
@@ -16,20 +16,20 @@
TAO::Storable_File_Guard::
Storable_File_Guard (bool redundant)
- : redundant_(redundant)
- , closed_(1)
+ : redundant_ (redundant)
+ , closed_ (1)
{
- ACE_TRACE("TAO::Storable_File_Guard::Storable_File_Guard");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_File_Guard::Storable_File_Guard"));
}
void
-TAO::Storable_File_Guard::init(const char * mode)
+TAO::Storable_File_Guard::init (const char * mode)
{
- ACE_TRACE("TAO::Storable_File_Guard::init");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_File_Guard::init"));
// We only accept a subset of mode argument, check it
rwflags_ = 0;
- for( unsigned int i = 0; i<ACE_OS::strlen(mode); i++ )
+ for ( unsigned int i = 0; i<ACE_OS::strlen (mode); i++ )
{
switch (mode[i])
{
@@ -45,25 +45,25 @@ TAO::Storable_File_Guard::init(const char * mode)
if( rwflags_ <= 0 )
{
errno = EINVAL;
- throw CORBA::PERSIST_STORE();
+ throw CORBA::PERSIST_STORE ();
}
// Create the stream
- fl_ = this->create_stream(mode);
+ fl_ = this->create_stream (mode);
if (redundant_)
{
- if (fl_->open() != 0)
+ if (fl_->open () != 0)
{
delete fl_;
- throw CORBA::PERSIST_STORE();
+ throw CORBA::PERSIST_STORE ();
}
// acquire a lock on it
- if (fl_ -> flock(0, 0, 0) != 0)
+ if (fl_ -> flock (0, 0, 0) != 0)
{
- fl_->close();
+ fl_->close ();
delete fl_;
- throw CORBA::INTERNAL();
+ throw CORBA::INTERNAL ();
}
// now that the file is successfully opened and locked it must be
@@ -82,12 +82,12 @@ TAO::Storable_File_Guard::init(const char * mode)
}
else if ( ! this->is_loaded_from_stream () || (rwflags_ & mode_write) )
{
- bool file_has_data = fl_->exists();
+ bool file_has_data = fl_->exists ();
- if (fl_->open() != 0)
+ if (fl_->open () != 0)
{
delete fl_;
- throw CORBA::PERSIST_STORE();
+ throw CORBA::PERSIST_STORE ();
}
// now that the file is successfully opened
@@ -123,7 +123,7 @@ TAO::Storable_File_Guard::mark_object_current (void)
void
TAO::Storable_File_Guard::release (void)
{
- ACE_TRACE("TAO::Storable_File_Guard::release");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_File_Guard::release"));
if ( ! closed_ )
{
// If we updated the disk, save the time stamp
@@ -140,9 +140,9 @@ TAO::Storable_File_Guard::release (void)
}
// Release the lock
- fl_->funlock(0, 0, 0);
+ fl_->funlock (0, 0, 0);
}
- fl_->close();
+ fl_->close ();
delete fl_;
closed_ = 1;
}
@@ -158,5 +158,5 @@ TAO::Storable_File_Guard::peer ()
TAO::Storable_File_Guard::
~Storable_File_Guard ()
{
- ACE_TRACE("TAO::Storable_File_Guard::~Storable_File_Guard");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_File_Guard::~Storable_File_Guard"));
}
diff --git a/TAO/tao/Storable_FlatFileStream.cpp b/TAO/tao/Storable_FlatFileStream.cpp
index c6b92cbbe71..247b9f50698 100644
--- a/TAO/tao/Storable_FlatFileStream.cpp
+++ b/TAO/tao/Storable_FlatFileStream.cpp
@@ -27,9 +27,9 @@ namespace
/// consumed. This could create problems if
/// the data the follows the newline is binary.
template<typename T>
- void read_integer(const char * format, T & i,
- TAO::Storable_Base::Storable_State & state,
- FILE * fl)
+ void read_integer (const char * format, T & i,
+ TAO::Storable_Base::Storable_State & state,
+ FILE * fl)
{
char buf[BUFSIZ];
char * result = fgets (buf, BUFSIZ, fl);
@@ -77,73 +77,74 @@ namespace
}
TAO::Storable_FlatFileStream::Storable_FlatFileStream (const ACE_CString & file,
- const char * mode)
+ const char * mode)
: fl_ (0)
{
- ACE_TRACE("TAO::Storable_FlatFileStream");
+ ACE_TRACE ( ACE_TEXT ("TAO::Storable_FlatFileStream"));
file_ = file;
mode_ = mode;
}
TAO::Storable_FlatFileStream::~Storable_FlatFileStream ()
{
- ACE_TRACE("~Storable_FlatFileStream");
+ ACE_TRACE (ACE_TEXT ("~Storable_FlatFileStream"));
if ( fl_ != 0 )
- this->close();
+ this->close ();
}
void
TAO::Storable_FlatFileStream::remove ()
{
- ACE_TRACE("remove");
- ACE_OS::unlink(ACE_TEXT_CHAR_TO_TCHAR(file_.c_str()));
+ ACE_TRACE (ACE_TEXT ("remove"));
+ ACE_OS::unlink (ACE_TEXT_CHAR_TO_TCHAR (file_.c_str()));
}
int
TAO::Storable_FlatFileStream::exists ()
{
- ACE_TRACE("exists");
+ ACE_TRACE (ACE_TEXT ("exists"));
// We could check the mode for this file, but for now just check exists
- return ! ACE_OS::access(file_.c_str(), F_OK);
+ return ! ACE_OS::access (file_.c_str (), F_OK);
}
int
-TAO::Storable_FlatFileStream::open()
+TAO::Storable_FlatFileStream::open ()
{
- ACE_TRACE("open");
+ ACE_TRACE ( ACE_TEXT ("open"));
// For now, three flags exist "r", "w", and "c"
int flags = 0;
const char *fdmode = 0;
- if( ACE_OS::strchr(mode_.c_str(), 'r') )
- if( ACE_OS::strchr(mode_.c_str(), 'w') )
+ if( ACE_OS::strchr (mode_.c_str (), 'r') )
+ if( ACE_OS::strchr (mode_.c_str (), 'w') )
flags = O_RDWR, fdmode = "r+";
else
flags = O_RDONLY, fdmode = "r";
else
flags = O_WRONLY, fdmode = "w";
- if( ACE_OS::strchr(mode_.c_str(), 'c') )
+ if( ACE_OS::strchr (mode_.c_str (), 'c') )
flags |= O_CREAT;
#ifndef ACE_WIN32
- if( ACE_OS::flock_init (&filelock_, flags, ACE_TEXT_CHAR_TO_TCHAR(file_.c_str()), 0666) != 0 )
+ if( ACE_OS::flock_init (&filelock_, flags, ACE_TEXT_CHAR_TO_TCHAR (file_.c_str()), 0666) != 0 )
ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open file %s for mode %s: (%d) %s\n",
- file_.c_str(), mode_.c_str(),
- errno, ACE_OS::strerror(errno)),
+ ACE_TEXT ("Cannot open file %s for mode %s: (%d) %s\n"),
+ file_.c_str (), mode_.c_str (),
+ errno, ACE_OS::strerror (errno)),
-1);
#else
- if( (filelock_.handle_= ACE_OS::open (ACE_TEXT_CHAR_TO_TCHAR(file_.c_str()), flags, 0)) == ACE_INVALID_HANDLE )
+ if( (filelock_.handle_= ACE_OS::open (
+ ACE_TEXT_CHAR_TO_TCHAR (file_.c_str ()), flags, 0)) == ACE_INVALID_HANDLE )
ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open file %s for mode %s: (%d) %s\n",
- file_.c_str(), mode_.c_str(),
- ACE_ERRNO_GET, ACE_OS::strerror(ACE_ERRNO_GET)),
+ ACE_TEXT ("Cannot open file %s for mode %s: (%d) %s\n"),
+ file_.c_str (), mode_.c_str (),
+ ACE_ERRNO_GET, ACE_OS::strerror (ACE_ERRNO_GET)),
-1);
#endif
- this->fl_ = ACE_OS::fdopen(filelock_.handle_, ACE_TEXT_CHAR_TO_TCHAR(fdmode));
+ this->fl_ = ACE_OS::fdopen (filelock_.handle_, ACE_TEXT_CHAR_TO_TCHAR (fdmode));
if (this->fl_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot fdopen file %s for mode %s: (%d) %s\n",
- file_.c_str(), mode_.c_str(),
- ACE_ERRNO_GET, ACE_OS::strerror(ACE_ERRNO_GET)),
+ ACE_TEXT ("Cannot fdopen file %s for mode %s: (%d) %s\n"),
+ file_.c_str (), mode_.c_str (),
+ ACE_ERRNO_GET, ACE_OS::strerror (ACE_ERRNO_GET)),
-1);
return 0;
}
@@ -151,8 +152,8 @@ TAO::Storable_FlatFileStream::open()
int
TAO::Storable_FlatFileStream::close()
{
- ACE_TRACE("close");
- ACE_OS::fflush(fl_);
+ ACE_TRACE (ACE_TEXT ("close"));
+ ACE_OS::fflush (fl_);
#ifndef ACE_WIN32
ACE_OS::flock_destroy (&filelock_, 0);
#endif
@@ -166,16 +167,16 @@ TAO::Storable_FlatFileStream::close()
int
TAO::Storable_FlatFileStream::flock (int whence, int start, int len)
{
- ACE_TRACE("flock");
+ ACE_TRACE (ACE_TEXT ("flock"));
#if defined (ACE_WIN32)
ACE_UNUSED_ARG (whence);
ACE_UNUSED_ARG (start);
ACE_UNUSED_ARG (len);
#else
- if( ACE_OS::strcmp(mode_.c_str(), "r") == 0 )
- ACE_OS::flock_rdlock(&filelock_, whence, start, len);
+ if( ACE_OS::strcmp (mode_.c_str(), ACE_TEXT_ALWAYS_CHAR ("r")) == 0 )
+ ACE_OS::flock_rdlock (&filelock_, whence, start, len);
else
- ACE_OS::flock_wrlock(&filelock_, whence, start, len);
+ ACE_OS::flock_wrlock (&filelock_, whence, start, len);
#endif
return 0;
}
@@ -183,36 +184,36 @@ TAO::Storable_FlatFileStream::flock (int whence, int start, int len)
int
TAO::Storable_FlatFileStream::funlock (int whence, int start, int len)
{
- ACE_TRACE("funlock");
+ ACE_TRACE (ACE_TEXT ("funlock"));
#if defined (ACE_WIN32)
ACE_UNUSED_ARG (whence);
ACE_UNUSED_ARG (start);
ACE_UNUSED_ARG (len);
#else
- ACE_OS::flock_unlock(&filelock_, whence, start, len);
+ ACE_OS::flock_unlock (&filelock_, whence, start, len);
#endif
return 0;
}
time_t
-TAO::Storable_FlatFileStream::last_changed(void)
+TAO::Storable_FlatFileStream::last_changed (void)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::last_changed");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileStream::last_changed"));
ACE_stat st;
- ACE_OS::fstat(filelock_.handle_, &st);
+ ACE_OS::fstat (filelock_.handle_, &st);
return st.st_mtime;
}
void
TAO::Storable_FlatFileStream::rewind (void)
{
- return ACE_OS::rewind(this->fl_);
+ return ACE_OS::rewind (this->fl_);
}
bool
TAO::Storable_FlatFileStream::flush (void)
{
- return ACE_OS::fflush(this->fl_);
+ return ACE_OS::fflush (this->fl_);
}
int
@@ -224,7 +225,7 @@ TAO::Storable_FlatFileStream::sync (void)
TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator << (const ACE_CString& str)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::operator <<");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileStream::operator <<"));
ACE_OS::fprintf(this->fl_, ACE_SIZE_T_FORMAT_SPECIFIER ACE_TEXT("\n%s\n"),
str.length(), str.c_str());
@@ -234,11 +235,11 @@ TAO::Storable_FlatFileStream::operator << (const ACE_CString& str)
TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator >> (ACE_CString& str)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::operator >>");
+ ACE_TRACE ( ACE_TEXT ("TAO::Storable_FlatFileStream::operator >>"));
int bufSize = 0;
ACE_CString::size_type const max_buf_len =
ACE_Numeric_Limits<ACE_CString::size_type>::max ();
- switch (fscanf(fl_, "%d\n", &bufSize))
+ switch (fscanf (fl_, ACE_TEXT_ALWAYS_CHAR ("%d\n"), &bufSize))
{
case 0:
this->setstate (badbit);
@@ -274,18 +275,18 @@ TAO::Storable_FlatFileStream::operator >> (ACE_CString& str)
TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator << (int i)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::operator <<");
- ACE_OS::fprintf (this->fl_, "%d\n", i);
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileStream::operator <<"));
+ ACE_OS::fprintf (this->fl_, ACE_TEXT ("%d\n"), i);
return *this;
}
TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator >> (int &i)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::operator >>");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileStream::operator >>"));
Storable_State state = this->rdstate ();
- read_integer ("%d\n", i, state, fl_);
+ read_integer (ACE_TEXT_ALWAYS_CHAR ("%d\n"), i, state, fl_);
this->setstate (state);
return *this;
@@ -294,18 +295,18 @@ TAO::Storable_FlatFileStream::operator >> (int &i)
TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator << (unsigned int i)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::operator <<");
- ACE_OS::fprintf (this->fl_, "%u\n", i);
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileStream::operator <<"));
+ ACE_OS::fprintf (this->fl_, ACE_TEXT ("%u\n"), i);
return *this;
}
TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator >> (unsigned int &i)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::operator >>");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileStream::operator >>"));
Storable_State state = this->rdstate ();
- read_integer ("%u\n", i, state, fl_);
+ read_integer (ACE_TEXT_ALWAYS_CHAR ("%u\n"), i, state, fl_);
this->setstate (state);
return *this;
@@ -314,7 +315,7 @@ TAO::Storable_FlatFileStream::operator >> (unsigned int &i)
TAO::Storable_Base &
TAO::Storable_FlatFileStream::operator << (const TAO_OutputCDR & cdr)
{
- ACE_TRACE("TAO::Storable_FlatFileStream::operator <<");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileStream::operator <<"));
unsigned int length = cdr.total_length ();
*this << length;
@@ -358,12 +359,14 @@ TAO::Storable_Base *
TAO::Storable_FlatFileFactory::create_stream (const ACE_CString & file,
const ACE_TCHAR * mode)
{
- ACE_TRACE("TAO::Storable_FlatFileFactory::create_stream");
+ ACE_TRACE (ACE_TEXT ("TAO::Storable_FlatFileFactory::create_stream"));
TAO::Storable_Base *stream = 0;
- ACE_CString path = this->directory_ + "/" + file;
+ ACE_CString path = this->directory_ + ACE_TEXT ("/") + file;
ACE_NEW_RETURN (stream,
- TAO::Storable_FlatFileStream(path, ACE_TEXT_ALWAYS_CHAR (mode)),
- 0);
+ TAO::Storable_FlatFileStream (
+ path,
+ ACE_TEXT_ALWAYS_CHAR (mode)),
+ 0);
return stream;
}
diff --git a/TAO/tao/Storable_FlatFileStream.h b/TAO/tao/Storable_FlatFileStream.h
index 2f6aa5067c1..1ebe4c68b52 100644
--- a/TAO/tao/Storable_FlatFileStream.h
+++ b/TAO/tao/Storable_FlatFileStream.h
@@ -35,8 +35,8 @@ namespace TAO
{
public:
- Storable_FlatFileStream(const ACE_CString & file, const char * mode);
- virtual ~Storable_FlatFileStream();
+ Storable_FlatFileStream (const ACE_CString & file, const char * mode);
+ virtual ~Storable_FlatFileStream ();
/// Remove a file by name (file is not open)
virtual void remove ();
@@ -98,7 +98,7 @@ namespace TAO
/// @param directory Directory to contain file passed in
/// create_stream (). The directory is assumed to already exist.
- Storable_FlatFileFactory(const ACE_CString & directory);
+ Storable_FlatFileFactory (const ACE_CString & directory);
const ACE_CString & get_directory () const;