1// vi:set ft=cpp: -*- Mode: C++ -*- 2/* 3 * (c) 2008-2009 Alexander Warg <warg@os.inf.tu-dresden.de> 4 * economic rights: Technische Universität Dresden (Germany) 5 * This file is part of TUD:OS and distributed under the terms of the 6 * GNU Lesser General Public License 2.1. 7 * Please see the COPYING-LGPL-2.1 file for details. 8 */ 9 10#pragma once 11 12namespace Ldr { 13 14class Stack 15{ 16public: 17 virtual char *push_object(void const *src, unsigned long size) = 0; 18 19 template< typename T > 20 T *push(T const &v) 21 { return reinterpret_cast<T*>(push_object(&v, sizeof(T))); } 22 23 virtual ~Stack() {} 24}; 25 26} 27