00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <rtt/os/StartStopManager.hpp>
00022 #include <rtt/TemplateTypeInfo.hpp>
00023 #include <rtt/Operators.hpp>
00024 #include <rtt/OperatorTypes.hpp>
00025 #include <rtt/RealTimeToolkit.hpp>
00026
00027 #include <rtt/VectorTemplateComposition.hpp>
00028
00029 namespace OCL
00030 {
00031 using namespace RTT;
00032 using namespace RTT::detail;
00033
00034 int loadOCL()
00035 {
00036
00037 RTT::TypeInfoRepository::Instance()->addType( new StdVectorTemplateTypeInfo<std::string,true>("strings") );
00038 RTT::TypeInfoRepository::Instance()->type("strings")->addConstructor(newConstructor(stdvector_ctor<std::string>() ) );
00039 RTT::TypeInfoRepository::Instance()->type("strings")->addConstructor(newConstructor(stdvector_ctor2<std::string>() ) );
00040 RTT::TypeInfoRepository::Instance()->type("strings")->addConstructor(new StdVectorBuilder<std::string>() );
00041 RTT::OperatorRepository::Instance()->add( newBinaryOperator( "[]", stdvector_index<std::string>() ) );
00042 RTT::OperatorRepository::Instance()->add( newDotOperator( "size", get_size<const std::vector<std::string>&>() ) );
00043
00044 RTT::TypeInfoRepository::Instance()->addType( new StdVectorTemplateTypeInfo<bool,true>("bools") );
00045 RTT::TypeInfoRepository::Instance()->type("bools")->addConstructor(newConstructor(stdvector_ctor<bool>() ) );
00046 RTT::TypeInfoRepository::Instance()->type("bools")->addConstructor(newConstructor(stdvector_ctor2<bool>() ) );
00047 RTT::TypeInfoRepository::Instance()->type("bools")->addConstructor(new StdVectorBuilder<bool>() );
00048 RTT::OperatorRepository::Instance()->add( newBinaryOperator( "[]", stdvector_index<bool>() ) );
00049 RTT::OperatorRepository::Instance()->add( newDotOperator( "size", get_size<const std::vector<bool>&>() ) );
00050
00051
00052
00053
00054
00055
00056
00057 RTT::TypeInfoRepository::Instance()->addType( new StdVectorTemplateTypeInfo<int,true>("ints") );
00058 RTT::TypeInfoRepository::Instance()->type("ints")->addConstructor(newConstructor(stdvector_ctor<int>() ) );
00059 RTT::TypeInfoRepository::Instance()->type("ints")->addConstructor(newConstructor(stdvector_ctor2<int>() ) );
00060 RTT::TypeInfoRepository::Instance()->type("ints")->addConstructor(new StdVectorBuilder<int>() );
00061 RTT::OperatorRepository::Instance()->add( newBinaryOperator( "[]", stdvector_index<int>() ) );
00062 RTT::OperatorRepository::Instance()->add( newDotOperator( "size", get_size<const std::vector<int>&>() ) );
00063
00064 return true;
00065 }
00066
00067 OS::InitFunction OCLLoader(&loadOCL);
00068 }
00069
00070