1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 #include <precomp.h>
23 #include "it_sequence.hxx"
24 
25 
26 // NOT FULLY DEFINED SERVICES
27 #include <cosv/tpl/processor.hxx>
28 #include <ary/idl/i_gate.hxx>
29 #include <ary/idl/ip_type.hxx>
30 
31 
32 
33 namespace ary
34 {
35 namespace idl
36 {
37 
38 
Sequence(Type_id i_nRelatedType)39 Sequence::Sequence( Type_id i_nRelatedType )
40     :   nRelatedType(i_nRelatedType)
41 {
42 }
43 
~Sequence()44 Sequence::~Sequence()
45 {
46 }
47 
48 ClassId
get_AryClass() const49 Sequence::get_AryClass() const
50 {
51     return class_id;
52 }
53 
54 void
do_Accept(csv::ProcessorIfc & io_processor) const55 Sequence::do_Accept( csv::ProcessorIfc & io_processor ) const
56 {
57     csv::CheckedCall(io_processor, *this);
58 }
59 
60 void
inq_Get_Text(StringVector & o_module,String & o_name,Ce_id & o_nRelatedCe,int & o_nSequenceCount,const Gate & i_rGate) const61 Sequence::inq_Get_Text( StringVector &      o_module,
62                         String &            o_name,
63                         Ce_id &             o_nRelatedCe,
64                         int &               o_nSequenceCount,
65                         const Gate &        i_rGate ) const
66 {
67     ++o_nSequenceCount;
68 
69     i_rGate.Types().Find_Type(nRelatedType)
70             .Get_Text(  o_module,
71                         o_name,
72                         o_nRelatedCe,
73                         o_nSequenceCount,
74                         i_rGate );
75 }
76 
77 const Type &
inq_FirstEnclosedNonSequenceType(const Gate & i_rGate) const78 Sequence::inq_FirstEnclosedNonSequenceType(const Gate & i_rGate) const
79 {
80     return i_rGate.Types().Find_Type(nRelatedType).FirstEnclosedNonSequenceType(i_rGate);
81 }
82 
83 
84 }   // namespace idl
85 }   // namespace ary
86