MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / dump_to_string

Method dump_to_string

dds/InfoRepo/DCPS_IR_Participant.cpp:879–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877}
878
879std::string
880DCPS_IR_Participant::dump_to_string(const std::string& prefix, int depth) const
881{
882 std::string str;
883#if !defined (OPENDDS_INFOREPO_REDUCED_FOOTPRINT)
884 OpenDDS::DCPS::RepoIdConverter local_converter(id_);
885
886 for (int i=0; i < depth; i++)
887 str += prefix;
888 std::string indent = str + prefix;
889 str += "DCPS_IR_Participant[";
890 str += std::string(local_converter);
891 str += "]";
892 if (isBitPublisher_)
893 str += " (BIT)";
894 std::ostringstream os;
895 os << "federation id[" << federationId_.id();
896 if (federationId_.overridden())
897 os << "(federated)";
898
899 os << "] owner[" << owner_ << "]";
900 str += os.str();
901 str += aliveStatus_ ? " (alive)" : " (not alive)";
902 str += "\n";
903
904 str += indent + "Topics:\n";
905 for (DCPS_IR_Topic_Map::const_iterator tm = topicRefs_.begin();
906 tm != topicRefs_.end();
907 tm++)
908 {
909 str += tm->second->dump_to_string(prefix, depth+1);
910 }
911
912 str += indent + "Publications:\n";
913 for (DCPS_IR_Publication_Map::const_iterator pm = publications_.begin();
914 pm != publications_.end();
915 pm++)
916 {
917 str += pm->second->dump_to_string(prefix, depth+1);
918 }
919
920 str += indent + "Subscriptions:\n";
921 for (DCPS_IR_Subscription_Map::const_iterator sm = subscriptions_.begin();
922 sm != subscriptions_.end();
923 sm++)
924 {
925 str += sm->second->dump_to_string(prefix, depth+1);
926 }
927
928 str += indent + "ignored Participants [ ";
929 for (TAO_DDS_RepoId_Set::const_iterator ipart = ignoredParticipants_.begin();
930 ipart != ignoredParticipants_.end();
931 ipart++)
932 {
933 OpenDDS::DCPS::RepoIdConverter ipart_converter(*ipart);
934 str += std::string(ipart_converter);
935 str += " ";
936 }

Callers

nothing calls this directly

Calls 5

overriddenMethod · 0.80
idMethod · 0.45
strMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected