00001 /* 00002 * Scale Stack 00003 * 00004 * Copyright 2010 Eric Day 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00024 #include "config.h" 00025 00026 #include <cassert> 00027 00028 #include <scalestack/kernel/core.h> 00029 #include <scalestack/kernel/module.h> 00030 00031 using namespace scalestack; 00032 00033 static void options(kernel::module& module) 00034 { 00035 assert(module.is_loaded() == true); 00036 } 00037 00038 static void start(kernel::module& module) 00039 { 00040 assert(module.get_name() == "kernel::test::module_grand_parent"); 00041 assert(module.get_pathname() != ""); 00042 assert(module.get_version() == "module_grand_parent version"); 00043 assert(module.get_author() == "module_grand_parent author"); 00044 assert(module.get_title() == "module_grand_parent title"); 00045 assert(module.get_license() == "module_grand_parent_license"); 00046 assert(module.get_dependencies() == ""); 00047 assert(module.get_parent_count() == 0); 00048 assert(module.is_loaded() == true); 00049 } 00050 00051 static void stop(kernel::module& module) 00052 { 00053 assert(module.is_loaded() == true); 00054 } 00055 00056 static void run(kernel::module& module) 00057 { 00058 assert(module.is_loaded() == true); 00059 module.get_core().shutdown(); 00060 } 00061 00062 static void reconfigure(kernel::module& module) 00063 { 00064 assert(module.is_loaded() == true); 00065 } 00066 00067 SCALESTACK_KERNEL_MODULE(options, start, stop, run, reconfigure);
1.6.3