[openrtm-commit:02842] r1053 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 9月 25日 (月) 09:49:47 JST
Author: t-katami
Date: 2017-09-25 09:49:47 +0900 (Mon, 25 Sep 2017)
New Revision: 1053
Added:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CompParam.java
Log:
[compat,newfunc->releng_1_2] refs #4189 , refs #4190
Added: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CompParam.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CompParam.java (rev 0)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/CompParam.java 2017-09-25 00:49:47 UTC (rev 1053)
@@ -0,0 +1,119 @@
+package jp.go.aist.rtm.RTC;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Arrays;
+
+
+/**
+ * {@.ja CompParam クラス}
+ * {@.en CompParam class}
+ * <p>
+ * {@.ja RTCのベンダ名、カテゴリ名、ID、言語、バージョンを格納するクラス。}
+ * {@.en This class stores a vendor name of RTC, a category name,
+ * ID, a language and the version.}
+ *
+ */
+public class CompParam {
+
+ public static final List<String> prof_list =
+ Collections.unmodifiableList(Arrays.asList(
+ "RTC",
+ "vendor",
+ "category",
+ "implementation_id",
+ "language",
+ "version"
+ ));
+
+ /**
+ * {@.ja コンストラクタ}
+ * {@.en Constructor}
+ * @param module_name
+ * {@.ja モジュール名}
+ * {@.en Module Name}
+ *
+ */
+ public CompParam(String module_name){
+ String modulename = module_name.split("\\?")[0];
+ String[] param_list = modulename.split(":",-1);
+ if(param_list.length < prof_list.size()){
+ m_type = "RTC";
+ m_vendor = "";
+ m_category = "";
+ m_impl_id = modulename;
+ m_language = "Java";
+ m_version = "";
+ }
+ else{
+ m_type = param_list[0];
+ m_vendor = param_list[1];
+ m_category = param_list[2];
+ m_impl_id = param_list[3];
+ if(!param_list[4].isEmpty()){
+ m_language = param_list[4];
+ }
+ else{
+ m_language = "Java";
+ }
+ m_version = param_list[5];
+ }
+ }
+ /**
+ * {@.ja ベンダ名取得}
+ * {@.en Gets the vendor name.}
+ * @return
+ * {@.ja ベンダ名}
+ * {@.en Vendor Name}
+ */
+ public String vendor(){
+ return m_vendor;
+ }
+ /**
+ * {@.ja カテゴリ名取得}
+ * {@.en Gets the category name.}
+ * @return
+ * {@.ja カテゴリ名取}
+ * {@.en Category Name}
+ */
+ public String category(){
+ return m_category;
+ }
+ /**
+ * {@.ja ID取得}
+ * {@.en Gets the ID.}
+ * @return
+ * {@.ja ID}
+ * {@.en ID}
+ */
+ public String impl_id(){
+ return m_impl_id;
+ }
+ /**
+ * {@.ja 言語取得}
+ * {@.en Gets the language.}
+ * @return
+ * {@.ja 言語}
+ * {@.en language}
+ */
+ public String language(){
+ return m_language;
+ }
+ /**
+ * {@.ja バージョン取得}
+ * {@.en Gets the version.}
+ * @return
+ * {@.ja バージョン}
+ * {@.en version}
+ */
+ public String version(){
+ return m_version;
+ }
+
+ private String m_type;
+ private String m_vendor;
+ private String m_category;
+ private String m_impl_id;
+ private String m_language;
+ private String m_version;
+}
More information about the openrtm-commit
mailing list