Exemple #1
0
pbbool be_ClientHeader::Open (const DDS_StdString& mainFilename)
{
   if (be_Source::Open (mainFilename))
   {
      BE_Globals::HFileOpen = pbtrue;
      os << "//******************************************************************\n"
         << "// \n"
         << "//  Generated by IDL to C++ Translator\n"
         << "//  \n"
         << "//  File name: " << BE_Globals::ClientHeaderFilename << "\n"
         << "//  Source: " << idl_global->main_filename()->get_string() << "\n"
         << "//  Generated: " << CreationTime() << "\n"
         << "//  OpenSplice " << OSPL_VERSION_STR << "\n"
         << "//  \n"
         << "//******************************************************************\n";

      ndefname = Ifndefize(BE_Globals::ClientHeaderFilename);
      os << "#ifndef " << (const char*) ndefname << nl;
      os << "#define " << (const char*) ndefname << nl;
      if (BE_Globals::isocpp || BE_Globals::isocpp_new_types)
      {
        os << "#ifndef OPENSPLICE_ISOCXX_PSM" << nl;
        os << "#define OPENSPLICE_ISOCXX_PSM" << nl;
        os << "#endif" << nl;
      }
      os << nl << "#include \"sacpp_mapping.h\"" << nl;
//      os << "#include \"sacpp_DDS_DCPS.h\"" << nl;
      GenerateSecondaryIncludes (os);
      if (BE_Globals::isocpp_new_types)
      {
        os << "#include <dds/core/ddscore.hpp>" << nl;
      }
      if (BE_Globals::isocpp_test_methods)
      {
        os << "#include <generate_test_values.hpp>" << nl;
      }
      if (BE_Globals::UserDLL != (const char *)"" &&
          BE_Globals::UserDLLHeader != (const char *)"" )
      {
        os << "#include \"" << BE_Globals::UserDLLHeader << "\"" << nl;
      }

      if (BE_Globals::UserDLL != (const char *)"")
      {
         BE_Globals::DLLExtension = " ";
      }
      os << nl;
      return pbtrue;
   }
   else
   {
      return pbfalse;
   }
}
Exemple #2
0
pbbool be_ClientHeader::Open (const DDS_StdString& mainFilename)
{
   if (be_Source::Open (mainFilename))
   {
      BE_Globals::HFileOpen = pbtrue;
      os << "//******************************************************************\n"
         << "// \n"
         << "//  Generated by IDL to C++ Translator\n"
         << "//  \n"
         << "//  File name: " << BE_Globals::ClientHeaderFilename << "\n"
         << "//  Source: " << idl_global->main_filename()->get_string() << "\n"
         << "//  Generated: " << CreationTime() << "\n"
         << "//  OpenSplice " << VERSION << "\n"
         << "//  \n"
         << "//******************************************************************\n";

      ndefname = Ifndefize(BE_Globals::ClientHeaderFilename);
      os << "#ifndef " << (const char*) ndefname << nl;
      os << "#define " << (const char*) ndefname << nl << nl;
      if (BE_Globals::UserDLL != (const char *)"" &&
          BE_Globals::UserDLLHeader != (const char *)"" )
      {
        os << "#include \"" << BE_Globals::UserDLLHeader << "\"" << nl;
      }
      os << "#include \"sacpp_mapping.h\"" << nl;
      os << "#include \"sacpp_DDS_DCPS.h\"" << nl;

      GenerateSecondaryIncludes (os);

      if (BE_Globals::UserDLL != (const char *)"")
      {
         BE_Globals::DLLExtension = " ";
      }

      return pbtrue;
   }
   else
   {
      return pbfalse;
   }
}