summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_string.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_string.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_string.cpp b/TAO/TAO_IDL/be/be_string.cpp
index 4d72f2ab761..ba4a3c87277 100644
--- a/TAO/TAO_IDL/be/be_string.cpp
+++ b/TAO/TAO_IDL/be/be_string.cpp
@@ -73,6 +73,45 @@ be_string::compute_tc_name (void)
}
int
+be_string::gen_typecode (void)
+{
+ TAO_OutStream *cs; // output stream
+ TAO_NL nl; // end line
+ TAO_CodeGen *cg = TAO_CODEGEN::instance ();
+
+ cs = cg->client_stubs ();
+ cs->indent (); // start from the current indentation level
+ // emit the enumeration
+ *cs << "CORBA::tk_string, " << nl;
+ *cs << this->max_size () << ", // string length\n";
+ return 0;
+}
+
+// compute typecode size
+long
+be_string::tc_size (void)
+{
+ // 4 bytes for enumeration, 4 bytes for storing string length
+ return 4 + 4;
+}
+
+int
+be_string::gen_encapsulation (void)
+{
+ return 0;
+}
+
+long
+be_string::tc_encap_len (void)
+{
+ if (this->encap_len_ == -1)
+ {
+ this->encap_len_ = 0; // no encapsulation
+ }
+ return this->encap_len_;
+}
+
+int
be_string::accept (be_visitor *visitor)
{
return visitor->visit_string (this);