be_global.cpp File Reference

#include "be_global.h"
#include "be_util.h"
#include "ast_generator.h"
#include "global_extern.h"
#include "idl_defines.h"
#include "utl_err.h"
#include "utl_string.h"
#include "ace/OS_NS_strings.h"
#include "ace/OS_NS_sys_stat.h"
#include "ace/ARGV.h"
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <set>

Include dependency graph for be_global.cpp:

Go to the source code of this file.

Typedefs

typedef set< string > Includes_t

Functions

std::string transform_referenced (const std::string &idl, const char *suffix)
std::string make_relative (const std::string &absolute)

Variables

BE_GlobalDatabe_global = 0
Includes_t inc_h_
Includes_t inc_c_
Includes_t inc_idl_
Includes_t referenced_idl_
Includes_t inc_path_
Includes_t inc_facets_h_
Includes_t inc_lang_h_
std::ostream & ret_
const char *const suffix_


Typedef Documentation

typedef set<string> Includes_t [static]

Definition at line 340 of file be_global.cpp.


Function Documentation

std::string @83::make_relative ( const std::string &  absolute  )  [static]

Definition at line 433 of file be_global.cpp.

References inc_path_.

00434   {
00435     for (Includes_t::const_iterator iter = inc_path_.begin(),
00436         end = inc_path_.upper_bound(absolute); iter != end; ++iter) {
00437       if (absolute.find(*iter) == 0) {
00438         string rel = absolute.substr(iter->size());
00439         if (rel.size() && (rel[0] == '/' || rel[0] == '\\')) {
00440           rel.erase(0, 1);
00441         }
00442         return rel;
00443       }
00444     }
00445     return absolute;
00446   }

std::string @83::transform_referenced ( const std::string &  idl,
const char *  suffix 
) [static]

Definition at line 412 of file be_global.cpp.

00413   {
00414     const size_t len = idl.size();
00415     string base_name;
00416     if (len >= 5 && 0 == ACE_OS::strcasecmp(idl.c_str() + len - 4, ".idl")) {
00417       base_name.assign(idl.c_str(), len - 4);
00418 
00419     } else if (len >= 6 &&
00420         0 == ACE_OS::strcasecmp(idl.c_str() + len - 5, ".pidl")) {
00421       base_name.assign(idl.c_str(), len - 5);
00422       size_t slash = base_name.find_last_of("/\\");
00423       if (slash != std::string::npos && slash > 3 && base_name.size() > 3
00424           && base_name.substr(slash - 3, 3) == "tao"
00425           && base_name.substr(base_name.size() - 3) == "Seq") {
00426         base_name = "dds/CorbaSeq/" + base_name.substr(slash + 1);
00427       }
00428     }
00429 
00430     return base_name + suffix;
00431   }


Variable Documentation

BE_GlobalData* be_global = 0

Definition at line 30 of file be_global.cpp.

Referenced by add_includes(), Function::addArg(), assign_field(), BE_Comment_Guard::BE_Comment_Guard(), BE_init(), BE_post_init(), BE_produce(), compare_field(), dds_visitor::dds_visitor(), delegateToNested(), Function::endArgs(), exporter(), Function::Function(), v8_generator::fwd_decl(), gen_array(), wireshark_generator::gen_array(), gen_array_traits(), langmap_generator::gen_const(), gen_copyto(), itl_generator::gen_enum(), langmap_generator::gen_enum(), marshal_generator::gen_enum(), metaclass_generator::gen_enum(), wireshark_generator::gen_enum(), itl_generator::gen_epilogue(), gen_field_createQC(), gen_field_getValue(), gen_field_getValueFromSerialized(), langmap_generator::gen_interf_fwd(), itl_generator::gen_prologue(), FaceGenerator::gen_sequence(), SafetyProfileGenerator::gen_sequence(), gen_sequence(), itl_generator::gen_struct(), keys_generator::gen_struct(), FaceGenerator::gen_struct(), SafetyProfileGenerator::gen_struct(), marshal_generator::gen_struct(), metaclass_generator::gen_struct(), ts_generator::gen_struct(), v8_generator::gen_struct(), wireshark_generator::gen_struct(), langmap_generator::gen_struct_fwd(), gen_typecode(), itl_generator::gen_typedef(), langmap_generator::gen_typedef(), metaclass_generator::gen_typedef(), v8_generator::gen_typedef(), wireshark_generator::gen_typedef(), itl_generator::gen_union(), GeneratorBase::gen_union(), marshal_generator::gen_union(), metaclass_generator::gen_union(), wireshark_generator::gen_union(), langmap_generator::gen_union_fwd(), java_ts_generator::generate(), face_ts_generator::generate(), GeneratorBase::generate_union_field(), generateBranchLabels(), generateCaseBody(), generateSwitchBodyForUnion(), generateSwitchForUnion(), genRtpsParameter(), genRtpsSpecialSequence(), genRtpsSpecialStruct(), genRtpsSubmessage(), get_raw_field(), FaceGenerator::init(), SafetyProfileGenerator::init(), langmap_generator::init(), map_type(), NamespaceGuard::NamespaceGuard(), NestedForLoops::NestedForLoops(), itl_generator::new_type(), GeneratorBase::GenerateGettersAndSetters::operator()(), operator<<(), postprocess(), be_util::prep_be_arg(), print_field_name(), struct_decls(), dds_visitor::visit_structure(), write_branch(), wireshark_generator::write_common(), write_field(), BE_GlobalData::writeFile(), BE_Comment_Guard::~BE_Comment_Guard(), Function::~Function(), NamespaceGuard::~NamespaceGuard(), and NestedForLoops::~NestedForLoops().

Includes_t inc_c_ [static]

Definition at line 341 of file be_global.cpp.

Referenced by BE_GlobalData::add_include(), BE_GlobalData::get_include_block(), and BE_GlobalData::reset_includes().

Includes_t inc_facets_h_ [static]

Definition at line 341 of file be_global.cpp.

Referenced by BE_GlobalData::add_include(), BE_GlobalData::get_include_block(), and BE_GlobalData::reset_includes().

Includes_t inc_h_ [static]

Definition at line 341 of file be_global.cpp.

Referenced by BE_GlobalData::add_include(), BE_GlobalData::get_include_block(), and BE_GlobalData::reset_includes().

Includes_t inc_idl_ [static]

Definition at line 341 of file be_global.cpp.

Referenced by BE_GlobalData::add_include(), BE_GlobalData::get_include_block(), and BE_GlobalData::reset_includes().

Includes_t inc_lang_h_ [static]

Definition at line 341 of file be_global.cpp.

Referenced by BE_GlobalData::add_include(), BE_GlobalData::get_include_block(), and BE_GlobalData::reset_includes().

Includes_t inc_path_ [static]

Definition at line 341 of file be_global.cpp.

Referenced by BE_GlobalData::add_inc_path(), make_relative(), and BE_GlobalData::set_inc_paths().

Includes_t referenced_idl_ [static]

Definition at line 341 of file be_global.cpp.

Referenced by BE_GlobalData::add_referenced(), BE_GlobalData::get_include_block(), and BE_GlobalData::reset_includes().

std::ostream& ret_

Definition at line 449 of file be_global.cpp.

const char* const suffix_

Definition at line 460 of file be_global.cpp.


Generated on Fri Feb 12 20:05:30 2016 for OpenDDS by  doxygen 1.4.7