diff options
author | gokhale <asgokhale@users.noreply.github.com> | 1997-09-30 19:14:59 +0000 |
---|---|---|
committer | gokhale <asgokhale@users.noreply.github.com> | 1997-09-30 19:14:59 +0000 |
commit | b668c9b9d0b70fddd711729679426c1218715b03 (patch) | |
tree | 69b5c626a364aab189be910fd197a2680225de29 /TAO/TAO_IDL/util/utl_global.cpp | |
parent | 90122882c7684945fee81544283834aa74939cb5 (diff) | |
download | ATCD-b668c9b9d0b70fddd711729679426c1218715b03.tar.gz |
ACEified a number of methods.
Diffstat (limited to 'TAO/TAO_IDL/util/utl_global.cpp')
-rw-r--r-- | TAO/TAO_IDL/util/utl_global.cpp | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index 90d8b046bc8..f53e6f12c94 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -476,3 +476,126 @@ void IDL_GlobalData::idl_src_file(String *s) { this->pd_idl_src_file = s; } + +/************ Helper functions **************/ +const char * +IDL_GlobalData::be_get_client_hdr_fname () +{ + String *s; + char *base; + static char fname[MAXNAMELEN]; + + ACE_OS::memset (fname, 0, MAXNAMELEN); + s = idl_global->idl_src_file (); + // get the IDL source file name + base = ACE_OS::strstr (s->get_string (), ".idl"); + // get the base part of the filename + if (base == NULL) + return 0; + + ACE_OS::strncpy (fname, s->get_string (), base - s->get_string ()); + ACE_OS::strcat (fname, "C.h"); + return fname; +} + +const char * +IDL_GlobalData::be_get_client_stub_fname () +{ + String *s; + char *base; + static char fname[MAXNAMELEN]; + + ACE_OS::memset (fname, 0, MAXNAMELEN); + s = idl_global->idl_src_file (); + // get the IDL source file name + base = ACE_OS::strstr (s->get_string (), ".idl"); + // get the base part of the filename + if (base == NULL) + return 0; + + ACE_OS::strncpy (fname, s->get_string (), base - s->get_string ()); + ACE_OS::strcat (fname, "C.cpp"); + return fname; +} + +const char * +IDL_GlobalData::be_get_client_inline_fname () +{ + String *s; + char *base; + static char fname[MAXNAMELEN]; + + ACE_OS::memset (fname, 0, MAXNAMELEN); + s = idl_global->idl_src_file (); + // get the IDL source file name + base = ACE_OS::strstr (s->get_string (), ".idl"); + // get the base part of the filename + if (base == NULL) + return 0; + + ACE_OS::strncpy (fname, s->get_string (), base - s->get_string ()); + ACE_OS::strcat (fname, "C.i"); + return fname; +} + +const char * +IDL_GlobalData::be_get_server_hdr_fname () +{ + String *s; + char *base; + static char fname[MAXNAMELEN]; + + ACE_OS::memset (fname, 0, MAXNAMELEN); + s = idl_global->idl_src_file (); + // get the IDL source file name + base = ACE_OS::strstr (s->get_string (), ".idl"); + // get the base part of the filename + if (base == NULL) + return 0; + + ACE_OS::strncpy (fname, s->get_string (), base - s->get_string ()); + ACE_OS::strcat (fname, "S.h"); + return fname; +} + +const char * +IDL_GlobalData::be_get_server_inline_fname () +{ + String *s; + char *base; + static char fname[MAXNAMELEN]; + + ACE_OS::memset (fname, 0, MAXNAMELEN); + s = idl_global->idl_src_file (); + // get the IDL source file name + base = ACE_OS::strstr (s->get_string (), ".idl"); + // get the base part of the filename + if (base == NULL) + return 0; + + ACE_OS::strncpy (fname, s->get_string (), base - s->get_string ()); + ACE_OS::strcat (fname, "S.i"); + return fname; +} + +const char * +IDL_GlobalData::be_get_server_skeleton_fname () +{ + String *s; + char *base; + static char fname[MAXNAMELEN]; + + ACE_OS::memset (fname, 0, MAXNAMELEN); + s = idl_global->idl_src_file (); + // get the IDL source file name + base = ACE_OS::strstr (s->get_string (), ".idl"); + // get the base part of the filename + if (base == NULL) + return 0; + + ACE_OS::strncpy (fname, s->get_string (), base - s->get_string ()); + ACE_OS::strcat (fname, "S.cpp"); + return fname; +} + + |