diff options
author | pgontla <pgontla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-08-02 15:45:58 +0000 |
---|---|---|
committer | pgontla <pgontla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-08-02 15:45:58 +0000 |
commit | 01175f0a76e99e99d6338845d41b9da65cc9310b (patch) | |
tree | d51db3ecd81458b93e44701ad78dede1b7e745b8 /TAO/orbsvcs/PSS | |
parent | 99fbb0a9978a06b304efed992451608d51a550da (diff) | |
download | ATCD-01175f0a76e99e99d6338845d41b9da65cc9310b.tar.gz |
ChangeLogTag: Fri Aug 2 08:44:19 2002 Priyanka Gontla <pgontla@ece.uci.edu>
Diffstat (limited to 'TAO/orbsvcs/PSS')
-rw-r--r-- | TAO/orbsvcs/PSS/PSDL_Struct_Visitor.cpp | 158 |
1 files changed, 80 insertions, 78 deletions
diff --git a/TAO/orbsvcs/PSS/PSDL_Struct_Visitor.cpp b/TAO/orbsvcs/PSS/PSDL_Struct_Visitor.cpp index f7976d68160..fa2db923b43 100644 --- a/TAO/orbsvcs/PSS/PSDL_Struct_Visitor.cpp +++ b/TAO/orbsvcs/PSS/PSDL_Struct_Visitor.cpp @@ -192,6 +192,8 @@ TAO_PSDL_Struct_Visitor::gen_code_for_si (void) // Some invocation call to put in the stuff that goes between // braces. + *ps_si << "TAO_ENCAP_BYTE_ORDER"; + ps_si->nl (); *ps_si << "// Typecode related information should go in here"; ps_si->nl (); @@ -575,24 +577,24 @@ TAO_PSDL_Struct_Visitor::print_class_for_structure (ACE_CString struct_name) << " _tc_" << struct_name << ";"; ps_sh->nl (); ps_sh->nl (); - + *ps_sh << " void operator<<= (CORBA::Any &, const " << struct_name << " &);" << "// copying version"; ps_sh->nl (); - + *ps_sh << " void operator<<= (CORBA::Any &, " << struct_name << "*);" << "// noncopying version"; ps_sh->nl (); - + *ps_sh << " CORBA::Boolean operator>>= " << "(const CORBA::Any &, " << struct_name << " *&);" << "// deprecated"; ps_sh->nl (); - + *ps_sh << " CORBA::Boolean operator>>= " << "(const CORBA::Any &, const " << struct_name << " *&);"; ps_sh->nl (); - + ps_sh->nl (); *ps_sh << "#ifndef __ACE_INLINE__"; @@ -605,7 +607,7 @@ TAO_PSDL_Struct_Visitor::print_class_for_structure (ACE_CString struct_name) ps_sh->nl (); *ps_sh << " CORBA::Boolean operator>> (TAO_InputCDR &, " << struct_name << " &);"; - + ps_sh->decr_indent (0); ps_sh->nl (); ps_sh->nl (); @@ -635,13 +637,13 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "ACE_INLINE"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_var::" << this->struct_name_ << "_var (void) // default constructor"; ps_sin->incr_indent (0); ps_sin->nl (); - + *ps_sin << ": ptr_ (0)"; ps_sin->decr_indent (0); @@ -653,7 +655,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->nl (); *ps_sin << "ACE_INLINE"; ps_sin->nl (); - *ps_sin << this->struct_name_ << "_var::" << this->struct_name_ << "_var (" << this->struct_name_ << " *p)"; + *ps_sin << this->struct_name_ << "_var::" << this->struct_name_ << "_var (" << this->struct_name_ << " *p)"; ps_sin->incr_indent (0); ps_sin->nl (); @@ -674,12 +676,12 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->incr_indent (0); ps_sin->nl (); - + *ps_sin << "if (p.ptr_)"; ps_sin->incr_indent (0); ps_sin->nl (); - + *ps_sin << "ACE_NEW (this->ptr_, ::" << this->struct_name_ << " (*p.ptr_));"; ps_sin->decr_indent (0); @@ -690,13 +692,13 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "this->ptr_ = 0;"; + *ps_sin << "this->ptr_ = 0;"; ps_sin->decr_indent (0); ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); @@ -707,13 +709,13 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->incr_indent (0); ps_sin->nl (); - - *ps_sin << "delete this->ptr_;"; + + *ps_sin << "delete this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); @@ -727,7 +729,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "delete this->ptr_;"; ps_sin->nl (); *ps_sin << "this->ptr_ = p;"; ps_sin->nl (); - *ps_sin << "return *this;"; + *ps_sin << "return *this;"; ps_sin->decr_indent (0); ps_sin->nl (); @@ -743,26 +745,26 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "if (this != &p)"; + *ps_sin << "if (this != &p)"; ps_sin->incr_indent (0); ps_sin->nl (); - - *ps_sin << "{"; + + *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - - *ps_sin << "if (p.ptr_ == 0)"; + + *ps_sin << "if (p.ptr_ == 0)"; ps_sin->incr_indent (0); ps_sin->nl (); - - *ps_sin << "{"; + + *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - + *ps_sin << "delete this->ptr_;"; ps_sin->nl (); *ps_sin << "this->ptr_ = 0;"; @@ -771,7 +773,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "}"; ps_sin->decr_indent (0); ps_sin->nl (); - + *ps_sin << "else"; ps_sin->incr_indent (0); @@ -783,16 +785,16 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << this->struct_name_ << " *deep_copy ="; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "new " << this->struct_name_ << " (*p.ptr_);"; + *ps_sin << "new " << this->struct_name_ << " (*p.ptr_);"; ps_sin->decr_indent (0);ps_sin->nl (); ps_sin->nl (); - - *ps_sin << "if (deep_copy != 0)"; + + *ps_sin << "if (deep_copy != 0)"; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "{"; + *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << this->struct_name_ << " *tmp = deep_copy;"; ps_sin->nl (); @@ -801,25 +803,25 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "delete deep_copy;"; ps_sin->decr_indent (0);ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->decr_indent (0); ps_sin->decr_indent (0);ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->decr_indent (0); ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "return *this;"; ps_sin->decr_indent (0); ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); @@ -829,23 +831,23 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return this->ptr_;"; + *ps_sin << "return this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "ACE_INLINE ::" << this->struct_name_ << " *"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_var::operator-> (void)"; ps_sin->nl (); *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return this->ptr_;"; + *ps_sin << "return this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); @@ -856,7 +858,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << "return *this->ptr_;"; - + ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << "}"; @@ -866,9 +868,9 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "ACE_INLINE"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_var::operator ::" << this->struct_name_ << " &() // cast "; ps_sin->nl (); *ps_sin << "{"; - + ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return *this->ptr_;"; + *ps_sin << "return *this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << "}"; @@ -895,11 +897,11 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return this->ptr_;"; + *ps_sin << "return this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; - + *ps_sin << "}"; + ps_sin->nl (); ps_sin->nl (); @@ -919,28 +921,28 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "ACE_INLINE ::" << this->struct_name_ << " &"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_var::inout (void)"; ps_sin->nl (); *ps_sin << "{"; - + ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << "return *this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "// mapping for variable size "; ps_sin->nl (); *ps_sin << "ACE_INLINE ::" << this->struct_name_ << " *&"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_var::out (void)"; ps_sin->nl (); *ps_sin << "{"; - + ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << "delete this->ptr_;"; ps_sin->nl (); *ps_sin << "this->ptr_ = 0;"; ps_sin->nl (); *ps_sin << "return this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); @@ -956,7 +958,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "return tmp;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); @@ -967,7 +969,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return this->ptr_;"; + *ps_sin << "return this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << "}"; @@ -984,7 +986,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->nl (); *ps_sin << "ACE_INLINE"; ps_sin->nl (); - *ps_sin << this->struct_name_ << "_out::" << this->struct_name_ << "_out (::" << this->struct_name_ << " *&p)"; + *ps_sin << this->struct_name_ << "_out::" << this->struct_name_ << "_out (::" << this->struct_name_ << " *&p)"; ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << ": ptr_ (p)"; @@ -992,9 +994,9 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - + *ps_sin << "this->ptr_ = 0;"; - + ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << "}"; @@ -1002,7 +1004,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->nl (); *ps_sin << "ACE_INLINE"; ps_sin->nl (); - *ps_sin << this->struct_name_ << "_out::" << this->struct_name_ << "_out (" << this->struct_name_ << "_var &p) // constructor from _var"; + *ps_sin << this->struct_name_ << "_out::" << this->struct_name_ << "_out (" << this->struct_name_ << "_var &p) // constructor from _var"; ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << ": ptr_ (p.out ())"; @@ -1012,11 +1014,11 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->incr_indent (0);ps_sin->nl (); *ps_sin << "delete this->ptr_;"; ps_sin->nl (); - *ps_sin << "this->ptr_ = 0;"; + *ps_sin << "this->ptr_ = 0;"; ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << "}"; - + ps_sin->nl (); ps_sin->nl (); @@ -1038,7 +1040,7 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->incr_indent (0);ps_sin->nl (); *ps_sin << "this->ptr_ = ACE_const_cast (" << this->struct_name_ << "_out&, p).ptr_;"; ps_sin->nl (); - *ps_sin << "return *this;"; + *ps_sin << "return *this;"; ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << "}"; @@ -1048,18 +1050,18 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "ACE_INLINE " << this->struct_name_ << "_out &"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_out::operator= (" << this->struct_name_ << " *p)"; ps_sin->nl (); - *ps_sin << "{"; + *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << "this->ptr_ = p;"; ps_sin->nl (); *ps_sin << "return *this;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "ACE_INLINE"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_out::operator ::" << this->struct_name_ << " *&() // cast"; ps_sin->nl (); *ps_sin << "{"; @@ -1070,18 +1072,18 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "ACE_INLINE ::" << this->struct_name_ << " *&"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_out::ptr (void) // ptr"; ps_sin->nl (); *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << "return this->ptr_;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "}"; + *ps_sin << "}"; ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "ACE_INLINE ::" << this->struct_name_ << " *"; ps_sin->nl (); *ps_sin << this->struct_name_ << "_out::operator-> (void)"; ps_sin->nl (); *ps_sin << "{"; @@ -1092,38 +1094,38 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) ps_sin->nl (); ps_sin->nl (); - + *ps_sin << "ACE_INLINE CORBA::Boolean operator<< " << "(TAO_OutputCDR &strm, const " << this->struct_name_ << " &_tao_aggregate)"; ps_sin->nl (); *ps_sin << "{"; ps_sin->incr_indent (0); ps_sin->nl (); - + *ps_sin << "if ("; ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << "(strm << _tao_aggregate.name.in ()) &&"; ps_sin->nl (); - *ps_sin << "(strm << _tao_aggregate.obj_ref.in ())"; + *ps_sin << "(strm << _tao_aggregate.obj_ref.in ())"; ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << ")"; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return 1;"; + *ps_sin << "return 1;"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << "else"; + *ps_sin << "else"; ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return 0;"; + *ps_sin << "return 0;"; - ps_sin->decr_indent (0); + ps_sin->decr_indent (0); ps_sin->decr_indent (0);ps_sin->nl (); *ps_sin << "}"; - ps_sin->nl (); + ps_sin->nl (); ps_sin->nl (); *ps_sin << "ACE_INLINE CORBA::Boolean operator>> " @@ -1140,21 +1142,21 @@ TAO_PSDL_Struct_Visitor::gen_code_for_sinline (void) *ps_sin << "(strm >> _tao_aggregate.obj_ref.out ())"; ps_sin->decr_indent (0); ps_sin->nl (); - *ps_sin << ")"; + *ps_sin << ")"; ps_sin->incr_indent (0); ps_sin->nl (); *ps_sin << "return 1;"; ps_sin->decr_indent (0); ps_sin->nl (); *ps_sin << "else"; - + ps_sin->incr_indent (0); ps_sin->nl (); - *ps_sin << "return 0;"; + *ps_sin << "return 0;"; ps_sin->decr_indent (0); ps_sin->decr_indent (0); ps_sin->nl (); - + *ps_sin << "}"; ps_sin->nl (); |