Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TC_Private_State Class Reference

Private state of the TypeCode. More...

#include <Typecode.h>

List of all members.

Public Methods

 TC_Private_State (CORBA::TCKind kind)
 Constructor. More...

 ~TC_Private_State (void)
 Destructor. More...


Public Attributes

TAO_SYNCH_MUTEX mutex_
CORBA::TCKind tc_kind_
 Our kind that will determine what kind of children we may have. More...

CORBA::Boolean tc_id_known_
CORBA::Boolean tc_name_known_
CORBA::Boolean tc_member_count_known_
CORBA::Boolean tc_member_type_list_known_
CORBA::Boolean tc_member_name_list_known_
CORBA::Boolean tc_member_label_list_known_
CORBA::Boolean tc_discriminator_type_known_
CORBA::Boolean tc_default_index_used_known_
CORBA::Boolean tc_length_known_
CORBA::Boolean tc_content_type_known_
CORBA::Boolean tc_discrim_pad_size_known_
CORBA::Boolean tc_member_visibility_list_known_
CORBA::Boolean tc_type_modifier_known_
CORBA::Boolean tc_concrete_base_type_known_
char * tc_id_
char * tc_name_
CORBA::ULong tc_member_count_
CORBA::TypeCode_ptrtc_member_type_list_
char ** tc_member_name_list_
CORBA::Any_ptrtc_member_label_list_
CORBA::TypeCode_ptr tc_discriminator_type_
CORBA::Long tc_default_index_used_
CORBA::ULong tc_length_
CORBA::TypeCode_ptr tc_content_type_
CORBA::Visibilitytc_member_visibility_list_
CORBA::ValueModifier tc_type_modifier_
CORBA::TypeCode_ptr tc_concrete_base_type_


Detailed Description

Private state of the TypeCode.

Used to store precomputed values

Definition at line 495 of file Typecode.h.


Constructor & Destructor Documentation

TC_Private_State::TC_Private_State CORBA::TCKind    kind
 

Constructor.

Definition at line 581 of file Typecode.cpp.

TC_Private_State::~TC_Private_State void   
 

Destructor.

Definition at line 615 of file Typecode.cpp.

References CORBA::release, CORBA::string_free, tc_concrete_base_type_, tc_concrete_base_type_known_, tc_content_type_, tc_content_type_known_, tc_discriminator_type_, tc_id_, tc_kind_, tc_member_count_, tc_member_label_list_, tc_member_label_list_known_, tc_member_name_list_, tc_member_name_list_known_, tc_member_type_list_, tc_member_type_list_known_, tc_member_visibility_list_, tc_member_visibility_list_known_, and tc_name_.

00616 {
00617   // the following just point into the buffer. So we just make it
00618   // point to 0
00619   this->tc_id_ = 0;
00620 
00621   if (this->tc_name_ != 0)
00622     {
00623       CORBA::string_free (this->tc_name_);
00624       this->tc_name_ = 0;
00625     }
00626 
00627   // determine what kind of children we may have and free the space accordingly
00628   switch (this->tc_kind_)
00629     {
00630       case CORBA::tk_enum:
00631           // free up the member name list
00632           if (this->tc_member_name_list_known_)
00633             {
00634               for (CORBA::ULong i = 0;
00635                    i < this->tc_member_count_;
00636                    i++)
00637                       {
00638                         CORBA::string_free (this->tc_member_name_list_ [i]);
00639                         this->tc_member_name_list_ [i] = 0;
00640                       }
00641 
00642               delete [] this->tc_member_name_list_;
00643                     this->tc_member_name_list_ = 0;
00644             }
00645 
00646           break;
00647       case CORBA::tk_struct:
00648       case CORBA::tk_except:
00649         {
00650           // free up the member name list
00651           if (this->tc_member_name_list_known_)
00652             {
00653               for (CORBA::ULong i = 0;
00654                    i < this->tc_member_count_;
00655                    i++)
00656                       {
00657                         CORBA::string_free (this->tc_member_name_list_ [i]);
00658                         this->tc_member_name_list_ [i] = 0;
00659                       }
00660 
00661               delete [] this->tc_member_name_list_;
00662                     this->tc_member_name_list_ = 0;
00663             }
00664 
00665           // free up member type list
00666           if (this->tc_member_type_list_known_)
00667             {
00668               for (CORBA::ULong i = 0;
00669                    i < this->tc_member_count_;
00670                    i++)
00671                       {
00672                         CORBA::release (this->tc_member_type_list_[i]);
00673                       }
00674 
00675               // Now free up the array.
00676               delete [] this->tc_member_type_list_;
00677                     this->tc_member_type_list_ = 0;
00678             }
00679           this->tc_member_count_ = 0;
00680         }
00681 
00682         break;
00683       case CORBA::tk_sequence:
00684       case CORBA::tk_array:
00685       case CORBA::tk_alias:
00686         // Delete the content type only if it has a parent i.e., if it
00687         // is not acquired from the pool of constant or predefined
00688         // typecodes.
00689         if (this->tc_content_type_known_ && this->tc_content_type_ != 0)
00690           {
00691             CORBA::release (this->tc_content_type_);
00692             this->tc_content_type_ = 0;
00693           }
00694 
00695         break;
00696       case CORBA::tk_union:
00697         {
00698           // free up the member name list
00699           if (this->tc_member_name_list_known_)
00700             {
00701               for (CORBA::ULong i = 0;
00702                    i < this->tc_member_count_;
00703                    i++)
00704                       {
00705                         CORBA::string_free (this->tc_member_name_list_ [i]);
00706                         this->tc_member_name_list_ [i] = 0;
00707                       }
00708 
00709               delete [] this->tc_member_name_list_;
00710             }
00711 
00712           // Free up type list, label list, and finally the discriminator
00713           if (this->tc_member_type_list_known_)
00714             {
00715               for (CORBA::ULong i = 0;
00716                    i < this->tc_member_count_;
00717                    i++)
00718                       {
00719                         CORBA::release (this->tc_member_type_list_[i]);
00720                       }
00721 
00722               // Now free up the array.
00723               delete [] this->tc_member_type_list_;
00724                     this->tc_member_type_list_ = 0;
00725             }
00726 
00727           if (this->tc_member_label_list_known_)
00728             {
00729               for (CORBA::ULong i = 0;
00730                    i < this->tc_member_count_;
00731                    i++)
00732                 // Free up the label (Any_ptr).
00733                 delete this->tc_member_label_list_[i];
00734 
00735               delete [] this->tc_member_label_list_;
00736                     this->tc_member_label_list_ = 0;
00737             }
00738 
00739           this->tc_member_count_ = 0;
00740 
00741           // Discriminator must come last b/c it will be inside the Any
00742           // in each element of the label list.
00743           CORBA::release (this->tc_discriminator_type_);
00744           this->tc_discriminator_type_ = 0;
00745         }
00746 
00747         break;
00748       case CORBA::tk_value:
00749         {
00750           // Free up the member name list.
00751           if (this->tc_member_name_list_known_)
00752             {
00753               for (CORBA::ULong i = 0;
00754                    i < this->tc_member_count_;
00755                    i++)
00756                 {
00757                   CORBA::string_free (this->tc_member_name_list_ [i]);
00758                   this->tc_member_name_list_ [i] = 0;
00759                 }
00760 
00761               delete [] this->tc_member_name_list_;
00762               this->tc_member_name_list_ = 0;
00763             }
00764 
00765           // Free up member type list.
00766           if (this->tc_member_type_list_known_)
00767             {
00768               for (CORBA::ULong i = 0;
00769                    i < this->tc_member_count_;
00770                    i++)
00771                 {
00772                   CORBA::release (this->tc_member_type_list_[i]);
00773                 }
00774 
00775               // Now free up the array.
00776               delete [] this->tc_member_type_list_;
00777               this->tc_member_type_list_ = 0;
00778             }
00779 
00780           this->tc_member_count_ = 0;
00781 
00782           // Free up the member visibility list.
00783           if (this->tc_member_visibility_list_known_)
00784             {
00785               delete [] this->tc_member_visibility_list_;
00786               this->tc_member_visibility_list_ = 0;
00787             }
00788 
00789           // Free up concrete base value typecode.
00790           if (this->tc_concrete_base_type_known_)
00791             {
00792               CORBA::release (this->tc_concrete_base_type_);
00793               this->tc_concrete_base_type_ = 0;
00794             }
00795 
00796           break;
00797       }
00798 
00799       default:
00800         break;
00801     }
00802 }


Member Data Documentation

TAO_SYNCH_MUTEX TC_Private_State::mutex_
 

Definition at line 504 of file Typecode.h.

CORBA::TypeCode_ptr TC_Private_State::tc_concrete_base_type_
 

Definition at line 539 of file Typecode.h.

Referenced by CORBA_TypeCode::private_concrete_base_type, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_concrete_base_type_known_
 

Definition at line 524 of file Typecode.h.

Referenced by CORBA_TypeCode::concrete_base_type, CORBA_TypeCode::private_concrete_base_type, and ~TC_Private_State.

CORBA::TypeCode_ptr TC_Private_State::tc_content_type_
 

Definition at line 536 of file Typecode.h.

Referenced by CORBA_TypeCode::private_content_type, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_content_type_known_
 

Definition at line 520 of file Typecode.h.

Referenced by CORBA_TypeCode::content_type, CORBA_TypeCode::private_content_type, and ~TC_Private_State.

CORBA::Long TC_Private_State::tc_default_index_used_
 

Definition at line 534 of file Typecode.h.

Referenced by CORBA_TypeCode::default_index, and CORBA_TypeCode::private_default_index_i.

CORBA::Boolean TC_Private_State::tc_default_index_used_known_
 

Definition at line 518 of file Typecode.h.

Referenced by CORBA_TypeCode::default_index, and CORBA_TypeCode::private_default_index_i.

CORBA::Boolean TC_Private_State::tc_discrim_pad_size_known_
 

Definition at line 521 of file Typecode.h.

CORBA::TypeCode_ptr TC_Private_State::tc_discriminator_type_
 

Definition at line 533 of file Typecode.h.

Referenced by CORBA_TypeCode::private_discriminator_type_i, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_discriminator_type_known_
 

Definition at line 517 of file Typecode.h.

Referenced by CORBA_TypeCode::discriminator_type, and CORBA_TypeCode::private_discriminator_type_i.

char* TC_Private_State::tc_id_
 

Definition at line 527 of file Typecode.h.

Referenced by CORBA_TypeCode::id, CORBA_TypeCode::private_id, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_id_known_
 

Definition at line 511 of file Typecode.h.

Referenced by CORBA_TypeCode::id, and CORBA_TypeCode::private_id.

CORBA::TCKind TC_Private_State::tc_kind_
 

Our kind that will determine what kind of children we may have.

Definition at line 507 of file Typecode.h.

Referenced by ~TC_Private_State.

CORBA::ULong TC_Private_State::tc_length_
 

Definition at line 535 of file Typecode.h.

Referenced by CORBA_TypeCode::length, and CORBA_TypeCode::private_length.

CORBA::Boolean TC_Private_State::tc_length_known_
 

Definition at line 519 of file Typecode.h.

Referenced by CORBA_TypeCode::length, and CORBA_TypeCode::private_length.

CORBA::ULong TC_Private_State::tc_member_count_
 

Definition at line 529 of file Typecode.h.

Referenced by CORBA_TypeCode::member_count, CORBA_TypeCode::member_name, CORBA_TypeCode::member_type, CORBA_TypeCode::member_visibility, CORBA_TypeCode::private_member_count, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_member_count_known_
 

Definition at line 513 of file Typecode.h.

Referenced by CORBA_TypeCode::member_count, CORBA_TypeCode::member_name, CORBA_TypeCode::member_type, CORBA_TypeCode::member_visibility, and CORBA_TypeCode::private_member_count.

CORBA::Any_ptr* TC_Private_State::tc_member_label_list_
 

Definition at line 532 of file Typecode.h.

Referenced by CORBA_TypeCode::private_member_label, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_member_label_list_known_
 

Definition at line 516 of file Typecode.h.

Referenced by CORBA_TypeCode::private_member_label, and ~TC_Private_State.

char** TC_Private_State::tc_member_name_list_
 

Definition at line 531 of file Typecode.h.

Referenced by CORBA_TypeCode::member_name, CORBA_TypeCode::private_member_name, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_member_name_list_known_
 

Definition at line 515 of file Typecode.h.

Referenced by CORBA_TypeCode::member_name, CORBA_TypeCode::private_member_name, and ~TC_Private_State.

CORBA::TypeCode_ptr* TC_Private_State::tc_member_type_list_
 

Definition at line 530 of file Typecode.h.

Referenced by CORBA_TypeCode::private_member_type, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_member_type_list_known_
 

Definition at line 514 of file Typecode.h.

Referenced by CORBA_TypeCode::member_type, CORBA_TypeCode::private_member_type, and ~TC_Private_State.

CORBA::Visibility* TC_Private_State::tc_member_visibility_list_
 

Definition at line 537 of file Typecode.h.

Referenced by CORBA_TypeCode::member_visibility, CORBA_TypeCode::private_member_visibility, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_member_visibility_list_known_
 

Definition at line 522 of file Typecode.h.

Referenced by CORBA_TypeCode::member_visibility, CORBA_TypeCode::private_member_visibility, and ~TC_Private_State.

char* TC_Private_State::tc_name_
 

Definition at line 528 of file Typecode.h.

Referenced by CORBA_TypeCode::name, CORBA_TypeCode::private_name, and ~TC_Private_State.

CORBA::Boolean TC_Private_State::tc_name_known_
 

Definition at line 512 of file Typecode.h.

Referenced by CORBA_TypeCode::name, and CORBA_TypeCode::private_name.

CORBA::ValueModifier TC_Private_State::tc_type_modifier_
 

Definition at line 538 of file Typecode.h.

Referenced by CORBA_TypeCode::private_type_modifier, and CORBA_TypeCode::type_modifier.

CORBA::Boolean TC_Private_State::tc_type_modifier_known_
 

Definition at line 523 of file Typecode.h.

Referenced by CORBA_TypeCode::private_type_modifier, and CORBA_TypeCode::type_modifier.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:47:46 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002