Skip to content
Snippets Groups Projects
Select Git revision
  • 744269395b0f781832bcd495f5b0405fe21ab1b4
  • master default protected
  • dev_2022
  • patch-1
  • develop
  • 50-use-ubuntus-libhidapi
  • issue-highLevelDispatch
  • issue-highLevelDesign
  • issue-motorStartBug
  • issue-commandLayerDesign
  • v1.0
  • v0.4-rc.13
  • v0.4-rc.12
  • v0.4-rc.11
  • v0.4-rc.10
  • v0.4-rc.9
  • v0.3-rc.8
  • v0.3-rc.7
  • v0.3-rc.6
  • v0.3-rc.5
  • v0.3-rc.4
  • v0.3-rc.3
  • v0.3-rc.2
  • v0.3-rc.1
  • v0.3-rc
  • v0.2
  • v0.1.1
  • v0.1
28 results

Sensor.m

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    s2_e3.1_rawPtr.cxx 800 B
    // SPDX-FileCopyrightText: © 2022 Competence Center for High Performance Computing in Hessen (HKHLR) <christian.iwainksy@hpc-hessen.de>
    //
    // SPDX-License-Identifier: MIT
    
    #include <memory>
    #include <iostream>
    using namespace std;
    struct Example {
      int myInt;
      Example(int arg):myInt(arg){};
      virtual ~Example(){cout<<"~Example" << myInt<<endl;};
    };
    struct Adapter {
      Example * TheExample;
      Adapter(Example * arg):TheExample(arg){};
      Example * get(){return TheExample;}
    };
    
    int main(int argc,char**){
      Example * rawPtr = new Example(11);
      cout << "rawPtr = " << rawPtr<< endl;
      Adapter adapter=Adapter(rawPtr);
      cout << "rawPtr = " << rawPtr<< endl;
      cout << "Use of example:" << adapter.get()->myInt << endl;
      adapter=Adapter(nullptr);
      cout << "End of Program" << endl;
      return 0;
    }