From 5bb1e59a958cd7d1d40ddde9878b8e3aeae84ca4 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 19 Jun 2019 10:59:16 +0900 Subject: [PATCH] Remove license description Change-Id: Idf225e8c6931b64124183463af536ee1cabbe48b Signed-off-by: Hwankyu Jhun --- idlc/c_gen/c_gen_base.cc | 9 ++------ idlc/c_gen/c_gen_base.h | 2 +- idlc/c_gen/c_gen_base_cb.h | 16 +-------------- idlc/c_gen/c_proxy_body_gen.cc | 2 +- idlc/c_gen/c_proxy_header_gen.cc | 2 +- idlc/c_gen/c_stub_body_gen.cc | 2 +- idlc/c_gen/c_stub_header_gen.cc | 2 +- idlc/cpp_gen/cpp_gen_base.cc | 9 ++------ idlc/cpp_gen/cpp_gen_base.h | 2 +- idlc/cpp_gen/cpp_gen_base_cb.h | 16 +-------------- idlc/cpp_gen/cpp_proxy_body_gen.cc | 2 +- idlc/cpp_gen/cpp_proxy_header_gen.cc | 2 +- idlc/cpp_gen/cpp_stub_body_gen.cc | 2 +- idlc/cpp_gen/cpp_stub_header_gen.cc | 2 +- idlc/cs_gen/cs_cb_copyright.h | 40 ------------------------------------ idlc/cs_gen/cs_cb_version.h | 26 +++++++++++++++++++++++ idlc/cs_gen/cs_gen_base.cc | 11 +++------- idlc/cs_gen/cs_gen_base.h | 2 +- idlc/cs_gen/cs_lib_gen.cc | 2 +- idlc/cs_gen/cs_proxy_gen.cc | 2 +- idlc/cs_gen/cs_stub_gen.cc | 2 +- 21 files changed, 49 insertions(+), 106 deletions(-) delete mode 100644 idlc/cs_gen/cs_cb_copyright.h create mode 100644 idlc/cs_gen/cs_cb_version.h diff --git a/idlc/c_gen/c_gen_base.cc b/idlc/c_gen/c_gen_base.cc index 4373c56..0b975f2 100644 --- a/idlc/c_gen/c_gen_base.cc +++ b/idlc/c_gen/c_gen_base.cc @@ -254,15 +254,10 @@ std::string CGeneratorBase::Trim(const std::string& str) { return str.substr(first, (last - first + 1)); } -void CGeneratorBase::GenLicenseDescription(std::ofstream& stream) { - GenTemplate(CB_COPYRIGHT, stream, +void CGeneratorBase::GenVersion(std::ofstream& stream) { + GenTemplate(CB_VERSION, stream, [&]()->std::string { return FULLVER; - }, - [&]()->std::string { - std::time_t t = std::time(NULL); - std::tm* local_time = std::localtime(&t); - return std::to_string(local_time->tm_year + 1900); }); } diff --git a/idlc/c_gen/c_gen_base.h b/idlc/c_gen/c_gen_base.h index 33d6c07..1bc2ae3 100644 --- a/idlc/c_gen/c_gen_base.h +++ b/idlc/c_gen/c_gen_base.h @@ -51,7 +51,7 @@ class CGeneratorBase : public Generator { return structures_; } - void GenLicenseDescription(std::ofstream& stream); + void GenVersion(std::ofstream& stream); void GenIncludeDefaultHeaders(std::ofstream& stream, bool body = true); void GenGNUSourceDefinition(std::ofstream& stream); std::string GetStructIdWithNamespace(const Structure& st); diff --git a/idlc/c_gen/c_gen_base_cb.h b/idlc/c_gen/c_gen_base_cb.h index 91449ab..5af4d66 100644 --- a/idlc/c_gen/c_gen_base_cb.h +++ b/idlc/c_gen/c_gen_base_cb.h @@ -17,23 +17,9 @@ #ifndef IDLC_C_GEN_C_GEN_BASE_CB_H_ #define IDLC_C_GEN_C_GEN_BASE_CB_H_ -const char CB_COPYRIGHT[] = +const char CB_VERSION[] = R"__c_cb(/* * Generated by tidlc $$. - * - * Copyright (c) $$ Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ )__c_cb"; diff --git a/idlc/c_gen/c_proxy_body_gen.cc b/idlc/c_gen/c_proxy_body_gen.cc index 85c7f11..39683d4 100644 --- a/idlc/c_gen/c_proxy_body_gen.cc +++ b/idlc/c_gen/c_proxy_body_gen.cc @@ -26,7 +26,7 @@ CProxyBodyGen::CProxyBodyGen(std::shared_ptr doc) : CBodyGeneratorBase(doc) {} void CProxyBodyGen::OnInitGen(std::ofstream& stream) { - GenLicenseDescription(stream); + GenVersion(stream); GenGNUSourceDefinition(stream); GenIncludeDefaultHeaders(stream); GenIncludeHeader(stream); diff --git a/idlc/c_gen/c_proxy_header_gen.cc b/idlc/c_gen/c_proxy_header_gen.cc index 0ca669c..e9eac53 100644 --- a/idlc/c_gen/c_proxy_header_gen.cc +++ b/idlc/c_gen/c_proxy_header_gen.cc @@ -26,7 +26,7 @@ CProxyHeaderGen::CProxyHeaderGen(std::shared_ptr doc) : CHeaderGeneratorBase(doc) {} void CProxyHeaderGen::OnInitGen(std::ofstream& stream) { - GenLicenseDescription(stream); + GenVersion(stream); GenPragmaOnce(stream); GenIncludeDefaultHeaders(stream, false); GenExplicitLinkageOpen(stream); diff --git a/idlc/c_gen/c_stub_body_gen.cc b/idlc/c_gen/c_stub_body_gen.cc index 19b5203..bfa6095 100644 --- a/idlc/c_gen/c_stub_body_gen.cc +++ b/idlc/c_gen/c_stub_body_gen.cc @@ -26,7 +26,7 @@ CStubBodyGen::CStubBodyGen(std::shared_ptr doc) : CBodyGeneratorBase(doc) {} void CStubBodyGen::OnInitGen(std::ofstream& stream) { - GenLicenseDescription(stream); + GenVersion(stream); GenGNUSourceDefinition(stream); GenIncludeDefaultHeaders(stream); GenIncludeHeader(stream); diff --git a/idlc/c_gen/c_stub_header_gen.cc b/idlc/c_gen/c_stub_header_gen.cc index 6755549..1936606 100644 --- a/idlc/c_gen/c_stub_header_gen.cc +++ b/idlc/c_gen/c_stub_header_gen.cc @@ -26,7 +26,7 @@ CStubHeaderGen::CStubHeaderGen(std::shared_ptr doc) : CHeaderGeneratorBase(doc) {} void CStubHeaderGen::OnInitGen(std::ofstream& stream) { - GenLicenseDescription(stream); + GenVersion(stream); GenPragmaOnce(stream); GenIncludeDefaultHeaders(stream, false); GenExplicitLinkageOpen(stream); diff --git a/idlc/cpp_gen/cpp_gen_base.cc b/idlc/cpp_gen/cpp_gen_base.cc index 20c69d0..5a08130 100644 --- a/idlc/cpp_gen/cpp_gen_base.cc +++ b/idlc/cpp_gen/cpp_gen_base.cc @@ -682,15 +682,10 @@ void CppGeneratorBase::GenHeaderCallback(std::ofstream& stream, }); } -void CppGeneratorBase::GenCopyright(std::ofstream& stream) { - GenTemplate(CB_COPYRIGHT, stream, +void CppGeneratorBase::GenVersion(std::ofstream& stream) { + GenTemplate(CB_VERSION, stream, [&]()->std::string { return FULLVER; - }, - [&]()->std::string { - std::time_t t = std::time(NULL); - std::tm* local_time = std::localtime(&t); - return std::to_string(local_time->tm_year + 1900); }); } diff --git a/idlc/cpp_gen/cpp_gen_base.h b/idlc/cpp_gen/cpp_gen_base.h index 4224b0f..c59e6bc 100644 --- a/idlc/cpp_gen/cpp_gen_base.h +++ b/idlc/cpp_gen/cpp_gen_base.h @@ -32,7 +32,7 @@ class CppGeneratorBase : public Generator { explicit CppGeneratorBase(std::shared_ptr doc); virtual ~CppGeneratorBase() = default; - void GenCopyright(std::ofstream& stream); + void GenVersion(std::ofstream& stream); void GenStructuresForHeader(std::ofstream& stream); void GenStructuresForBody(std::ofstream& stream); void GenSerializer(std::ofstream& stream); diff --git a/idlc/cpp_gen/cpp_gen_base_cb.h b/idlc/cpp_gen/cpp_gen_base_cb.h index dccfe37..56216c4 100644 --- a/idlc/cpp_gen/cpp_gen_base_cb.h +++ b/idlc/cpp_gen/cpp_gen_base_cb.h @@ -101,23 +101,9 @@ rpc_port_parcel_h operator >> (rpc_port_parcel_h h, ##::CallbackBase& cb) { } )__cpp_cb"; -const char CB_COPYRIGHT[] = +const char CB_VERSION[] = R"__cpp_cb(/* * Generated by tidlc $$. - * - * Copyright (c) $$ Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ )__cpp_cb"; diff --git a/idlc/cpp_gen/cpp_proxy_body_gen.cc b/idlc/cpp_gen/cpp_proxy_body_gen.cc index 9338d0f..0fe8607 100644 --- a/idlc/cpp_gen/cpp_proxy_body_gen.cc +++ b/idlc/cpp_gen/cpp_proxy_body_gen.cc @@ -33,7 +33,7 @@ void CppProxyBodyGen::OnInitGen(std::ofstream& stream) { if (found != std::string::npos) header_file.replace(found, key.length(), ".h"); - GenCopyright(stream); + GenVersion(stream); stream << NLine(1); stream << "#include " << NLine(1) << "#include " << NLine(1) diff --git a/idlc/cpp_gen/cpp_proxy_header_gen.cc b/idlc/cpp_gen/cpp_proxy_header_gen.cc index 91a2b18..153cbeb 100644 --- a/idlc/cpp_gen/cpp_proxy_header_gen.cc +++ b/idlc/cpp_gen/cpp_proxy_header_gen.cc @@ -26,7 +26,7 @@ CppProxyHeaderGen::CppProxyHeaderGen(std::shared_ptr doc) : CppGeneratorBase(doc) {} void CppProxyHeaderGen::OnInitGen(std::ofstream& stream) { - GenCopyright(stream); + GenVersion(stream); stream << CB_HEADER; GenNamespace(stream); } diff --git a/idlc/cpp_gen/cpp_stub_body_gen.cc b/idlc/cpp_gen/cpp_stub_body_gen.cc index b287f28..f564f9e 100644 --- a/idlc/cpp_gen/cpp_stub_body_gen.cc +++ b/idlc/cpp_gen/cpp_stub_body_gen.cc @@ -33,7 +33,7 @@ void CppStubBodyGen::OnInitGen(std::ofstream& stream) { if (found != std::string::npos) header_file.replace(found, key.length(), ".h"); - GenCopyright(stream); + GenVersion(stream); stream << NLine(1); stream << "#include " << NLine(1) << "#include " << NLine(1) diff --git a/idlc/cpp_gen/cpp_stub_header_gen.cc b/idlc/cpp_gen/cpp_stub_header_gen.cc index c2d4d4f..a4e591b 100644 --- a/idlc/cpp_gen/cpp_stub_header_gen.cc +++ b/idlc/cpp_gen/cpp_stub_header_gen.cc @@ -26,7 +26,7 @@ CppStubHeaderGen::CppStubHeaderGen(std::shared_ptr doc) : CppGeneratorBase(doc) {} void CppStubHeaderGen::OnInitGen(std::ofstream& stream) { - GenCopyright(stream); + GenVersion(stream); stream << CB_HEADER; GenNamespace(stream); } diff --git a/idlc/cs_gen/cs_cb_copyright.h b/idlc/cs_gen/cs_cb_copyright.h deleted file mode 100644 index 7982f9a..0000000 --- a/idlc/cs_gen/cs_cb_copyright.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef IDLC_CS_GEN_CS_CB_COPYRIGHT_H_ -#define IDLC_CS_GEN_CS_CB_COPYRIGHT_H_ - -const char cs_cb_copyright[] = -R"__cs_cb(/* - * Generated by tidlc $$. - * - * Copyright (c) $$ Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -)__cs_cb"; - -#endif // IDLC_CS_GEN_CS_CB_COPYRIGHT_H_ diff --git a/idlc/cs_gen/cs_cb_version.h b/idlc/cs_gen/cs_cb_version.h new file mode 100644 index 0000000..c0102a4 --- /dev/null +++ b/idlc/cs_gen/cs_cb_version.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef IDLC_CS_GEN_CS_CB_VERSION_H_ +#define IDLC_CS_GEN_CS_CB_VERSION_H_ + +const char cs_cb_version[] = +R"__cs_cb(/* + * Generated by tidlc $$. + */ +)__cs_cb"; + +#endif // IDLC_CS_GEN_CS_CB_VERSION_H_ diff --git a/idlc/cs_gen/cs_gen_base.cc b/idlc/cs_gen/cs_gen_base.cc index a9d8c1c..d1f7b65 100644 --- a/idlc/cs_gen/cs_gen_base.cc +++ b/idlc/cs_gen/cs_gen_base.cc @@ -20,7 +20,7 @@ #include "idlc/cs_gen/cs_gen_base.h" namespace { -#include "idlc/cs_gen/cs_cb_copyright.h" +#include "idlc/cs_gen/cs_cb_version.h" #include "idlc/cs_gen/cs_gen_base_cb.h" #include "idlc/cs_gen/cs_cb_rpc_port.h" } @@ -497,15 +497,10 @@ void CsGeneratorBase::GenInvokeMethod(std::ofstream& stream, }); } -void CsGeneratorBase::GenCopyright(std::ofstream& stream) { - GenTemplate(::cs_cb_copyright, stream, +void CsGeneratorBase::GenVersion(std::ofstream& stream) { + GenTemplate(::cs_cb_version, stream, [&]()->std::string { return FULLVER; - }, - [&]()->std::string { - std::time_t t = std::time(NULL); - std::tm* local_time = std::localtime(&t); - return std::to_string(local_time->tm_year + 1900); }); stream << NLine(1); } diff --git a/idlc/cs_gen/cs_gen_base.h b/idlc/cs_gen/cs_gen_base.h index 7ee0d59..cbc35c9 100644 --- a/idlc/cs_gen/cs_gen_base.h +++ b/idlc/cs_gen/cs_gen_base.h @@ -32,7 +32,7 @@ class CsGeneratorBase : public Generator { explicit CsGeneratorBase(std::shared_ptr doc); virtual ~CsGeneratorBase() = default; - void GenCopyright(std::ofstream& stream); + void GenVersion(std::ofstream& stream); void GenStructures(std::ofstream& stream); void GenStructure(std::ofstream& stream, const Structure& st); void GenSerializer(std::ofstream& stream); diff --git a/idlc/cs_gen/cs_lib_gen.cc b/idlc/cs_gen/cs_lib_gen.cc index 9cc5d29..8f2eba0 100644 --- a/idlc/cs_gen/cs_lib_gen.cc +++ b/idlc/cs_gen/cs_lib_gen.cc @@ -27,7 +27,7 @@ CsLibGen::CsLibGen(std::shared_ptr doc) : CsGeneratorBase(doc) {} void CsLibGen::OnInitGen(std::ofstream& stream) { - GenCopyright(stream); + GenVersion(stream); stream << "using System;" << NLine(1) << "using System.Collections.Generic;" << NLine(1) << "using System.Runtime.InteropServices;" << NLine(1) diff --git a/idlc/cs_gen/cs_proxy_gen.cc b/idlc/cs_gen/cs_proxy_gen.cc index 890486c..23e24f3 100644 --- a/idlc/cs_gen/cs_proxy_gen.cc +++ b/idlc/cs_gen/cs_proxy_gen.cc @@ -26,7 +26,7 @@ CsProxyGen::CsProxyGen(std::shared_ptr doc) : CsGeneratorBase(doc) {} void CsProxyGen::OnInitGen(std::ofstream& stream) { - GenCopyright(stream); + GenVersion(stream); stream << "using System;" << NLine(1) << "using System.Collections.Generic;" << NLine(1) << "using System.Threading;" << NLine(1) diff --git a/idlc/cs_gen/cs_stub_gen.cc b/idlc/cs_gen/cs_stub_gen.cc index 8e84284..e11800d 100644 --- a/idlc/cs_gen/cs_stub_gen.cc +++ b/idlc/cs_gen/cs_stub_gen.cc @@ -26,7 +26,7 @@ CsStubGen::CsStubGen(std::shared_ptr doc) : CsGeneratorBase(doc) {} void CsStubGen::OnInitGen(std::ofstream& stream) { - GenCopyright(stream); + GenVersion(stream); stream << "using System;" << NLine(1) << "using System.Collections.Generic;" << NLine(1) << "using Tizen.Applications;" << NLine(1) -- 2.7.4