5 * Copyright (C) 2008 Pawel Dziepak
10 #include "component.h"
11 #include "implementation.h"
14 using namespace manes
;
16 void implementation::set_owner(component
*own
) {
20 component
*implementation::get_parent() {
21 component
*comp
= owner
; //->get_parent();
22 //asm ("cli\nhlt"::"a"(comp));
26 component::component(component
*_parent
, type
*_type
, interface
*_intf
, implementation
*_impl
) : intf(_intf
), impl(_impl
), obj_type(_type
), parent(_parent
), me(new component_name(_type
->get_name(), "a")) {
27 assert("component: attempt to create component without impl", impl
== 0);
28 assert("component: attempt to create component without type", obj_type
== 0);
30 impl
->set_owner(this);
33 const component_name
*component::get_name() const {
37 component
*component::get_parent() const {
41 const type
*component::get_type() const {
45 component::obj_location
component::get_location() const {
46 return local_kernel
; //locate;
49 interface
*component::get_interface() const {
53 component::operator interface
*() {
54 return get_interface();
57 implementation
*component::get_implementation() const {
58 void inject_caller(void *object
);
64 component::operator implementation
*() {
65 return get_implementation();