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 23 24 #include <precomp.h> 25 26 27 // NOT FULLY DEFINED SERVICES 28 #include <udm/integer_i.hxx> 29 #include <udm/string_i.hxx> 30 31 using namespace udm; 32 33 // TypeSystem aTypeSys; 34 35 36 class Function 37 { 38 public: 39 40 intt nId; 41 }; 42 43 class Ctor : public Function 44 { 45 public: 46 47 csv::String sClassName; 48 }; 49 50 class Method : public Function 51 { 52 public: 53 54 csv::String sFunctionName; 55 std::vector< std::pair< intt, String > > 56 aParameters; 57 }; 58 59 60 class PrObj 61 { 62 public: 63 intt nId; 64 csv::String sName; 65 std::vector< PrObj* > 66 aMethods; 67 std::vector< PrObj* > 68 aData; 69 }; 70 71 72 73 fx()74void fx() 75 { 76 intt n = 5; 77 Dyn<Integer_i> px = new Integer_i(n); 78 Integer & x = *px; 79 80 csv::String s; 81 Dyn<String_i> ps = new String_i(s); 82 String & xs = *ps; 83 84 xs = "Hallo"; 85 86 int dev01 = 2; 87 88 xs = csv::String("Haha"); 89 90 dev01 = 2; 91 92 csv::String s2 = xs; 93 94 95 dev01 = 2; 96 97 // const char * pc = xs; 98 99 100 intt a = x; 101 x = 15; 102 103 Cout() << a << " " << x << Endl(); // Must be: 5 15 104 } 105 106 107 108 109