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_explicit.hxx"
24
25
26 // NOT FULLY DEFINED SERVICES
27 #include <cosv/tpl/processor.hxx>
28 #include <ary/idl/i_module.hxx>
29 #include <ary/idl/i_gate.hxx>
30 #include <ary/idl/ip_ce.hxx>
31 #include <ary/idl/ip_type.hxx>
32 #include "it_xnameroom.hxx"
33
34
35
36 namespace ary
37 {
38 namespace idl
39 {
40
41
ExplicitType(const String & i_sName,Type_id i_nXNameRoom,Ce_id i_nModuleOfOccurrence,const std::vector<Type_id> * i_templateParameters)42 ExplicitType::ExplicitType( const String & i_sName,
43 Type_id i_nXNameRoom,
44 Ce_id i_nModuleOfOccurrence,
45 const std::vector<Type_id> *
46 i_templateParameters )
47 : Named_Type(i_sName),
48 nXNameRoom(i_nXNameRoom),
49 nModuleOfOccurrence(i_nModuleOfOccurrence),
50 pTemplateParameters(0)
51 {
52 if (i_templateParameters != 0)
53 pTemplateParameters = new std::vector<Type_id>(*i_templateParameters);
54 }
55
~ExplicitType()56 ExplicitType::~ExplicitType()
57 {
58 }
59
60 ClassId
get_AryClass() const61 ExplicitType::get_AryClass() const
62 {
63 return class_id;
64 }
65
66 void
do_Accept(csv::ProcessorIfc & io_processor) const67 ExplicitType::do_Accept( csv::ProcessorIfc & io_processor ) const
68 {
69 csv::CheckedCall(io_processor, *this);
70 }
71
72 void
inq_Get_Text(StringVector & o_module,String & o_name,Ce_id & o_nRelatedCe,int & o_nSequenceCount,const Gate & i_rGate) const73 ExplicitType::inq_Get_Text( StringVector & o_module,
74 String & o_name,
75 Ce_id & o_nRelatedCe,
76 int & o_nSequenceCount,
77 const Gate & i_rGate ) const
78 {
79 const ExplicitNameRoom &
80 rNameRoom = i_rGate.Types().Find_XNameRoom(nXNameRoom);
81 rNameRoom.Get_Text(o_module,o_name,o_nRelatedCe,o_nSequenceCount,i_rGate);
82
83 o_name = Name();
84 }
85
86 const std::vector<Type_id> *
inq_TemplateParameters() const87 ExplicitType::inq_TemplateParameters() const
88 {
89 return pTemplateParameters.Ptr();
90 }
91
92
93 } // namespace idl
94 } // namespace ary
95