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 "tplparam.hxx" 24 25 26 // NOT FULLY DEFINED SERVICES 27 #include <ary/cpp/c_gate.hxx> 28 #include <ary/cpp/cp_type.hxx> 29 30 31 namespace ary 32 { 33 namespace cpp 34 { 35 namespace ut 36 { 37 TplParameter_Type(Tid i_nType)38TplParameter_Type::TplParameter_Type( Tid i_nType ) 39 : nType(i_nType) 40 { 41 } 42 ~TplParameter_Type()43TplParameter_Type::~TplParameter_Type() 44 { 45 } 46 47 intt Compare(const TemplateParameter & i_rOther) const48TplParameter_Type::Compare( const TemplateParameter & i_rOther ) const 49 { 50 const TplParameter_Type * pOther 51 = dynamic_cast< const TplParameter_Type* >( &i_rOther ); 52 if (pOther == 0) 53 return -1; 54 55 return static_cast<long>(nType.Value()) 56 - static_cast<long>(pOther->nType.Value()); 57 } 58 59 void Get_Text(StreamStr & o_rOut,const ary::cpp::Gate & i_rGate) const60TplParameter_Type::Get_Text( StreamStr & o_rOut, 61 const ary::cpp::Gate & i_rGate ) const 62 { 63 i_rGate.Types().Get_TypeText( o_rOut, nType ); 64 } 65 66 } // namespace ut 67 } // namespace cpp 68 } // namespace ary 69