simple_object.cc revision 12336:9ead840035df
112955Sgabeblack@google.com/* 212955Sgabeblack@google.com * Copyright (c) 2016 Jason Lowe-Power 312955Sgabeblack@google.com * All rights reserved. 412955Sgabeblack@google.com * 512955Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 612955Sgabeblack@google.com * modification, are permitted provided that the following conditions are 712955Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 812955Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 912955Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1012955Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1112955Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1212955Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1312955Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1412955Sgabeblack@google.com * this software without specific prior written permission. 1512955Sgabeblack@google.com * 1612955Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1712955Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1812955Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1912955Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2012955Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2112955Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2212955Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2312955Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2412955Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2512955Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2612955Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2712955Sgabeblack@google.com * 2812955Sgabeblack@google.com * Authors: Jason Lowe-Power 2912955Sgabeblack@google.com */ 3012955Sgabeblack@google.com 3112955Sgabeblack@google.com#include "learning_gem5/part2/simple_object.hh" 3212955Sgabeblack@google.com 3312955Sgabeblack@google.com#include <iostream> 3412955Sgabeblack@google.com 3512957Sgabeblack@google.comSimpleObject::SimpleObject(SimpleObjectParams *params) : 3612957Sgabeblack@google.com SimObject(params) 3712955Sgabeblack@google.com{ 3812955Sgabeblack@google.com std::cout << "Hello World! From a SimObject!" << std::endl; 3912955Sgabeblack@google.com} 4012955Sgabeblack@google.com 4112955Sgabeblack@google.comSimpleObject* 4212955Sgabeblack@google.comSimpleObjectParams::create() 4312955Sgabeblack@google.com{ 4412955Sgabeblack@google.com return new SimpleObject(this); 4512955Sgabeblack@google.com} 4612962Sgabeblack@google.com