// // Copyright (c) 2012 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. // /** * @file FSclOrganization.cpp * @brief This is the implementation for Organization class. * * This file contains definitions of @e Organization class. */ #include #include #include #include "FScl_OrganizationImpl.h" using namespace Tizen::Base; namespace Tizen { namespace Social { Organization::Organization(void) { __pOrganizationImpl = new (std::nothrow) _OrganizationImpl(); SysTryReturnVoidResult(NID_SCL, __pOrganizationImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } Organization::Organization(const Organization& rhs) :__pOrganizationImpl(null) { __pOrganizationImpl = new (std::nothrow) _OrganizationImpl(*rhs.__pOrganizationImpl); SysTryReturnVoidResult(NID_SCL, __pOrganizationImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); } Organization::~Organization(void) { delete __pOrganizationImpl; } Organization& Organization::operator =(const Organization& rhs) { if (this == &rhs) { return *this; } *__pOrganizationImpl = *rhs.__pOrganizationImpl; return *this; } bool Organization::operator ==(const Organization& rhs) const { return *__pOrganizationImpl == *rhs.__pOrganizationImpl; } bool Organization::operator !=(const Organization& rhs) const { return !(*this == rhs); } bool Organization::Equals(const Object& rhs) const { const Organization* pOrganization = dynamic_cast(&rhs); if (pOrganization == null) { return false; } return __pOrganizationImpl->Equals(*pOrganization->__pOrganizationImpl); } int Organization::GetHashCode(void) const { return __pOrganizationImpl->GetHashCode(); } String Organization::GetName(void) const { return __pOrganizationImpl->GetName(); } String Organization::GetJobTitle(void) const { return __pOrganizationImpl->GetJobTitle(); } String Organization::GetDepartment(void) const { return __pOrganizationImpl->GetDepartment(); } String Organization::GetRole(void) const { return __pOrganizationImpl->GetRole(); } String Organization::GetAgent(void) const { return __pOrganizationImpl->GetAgent(); } OrganizationType Organization::GetType(void) const { return __pOrganizationImpl->GetType(); } String Organization::GetLabel(void) const { return __pOrganizationImpl->GetLabel(); } String Organization::GetLocation(void) const { return __pOrganizationImpl->GetLocation(); } String Organization::GetDescription(void) const { return __pOrganizationImpl->GetDescription(); } String Organization::GetPhoneticName(void) const { return __pOrganizationImpl->GetPhoneticName(); } String Organization::GetLogoPath(void) const { return __pOrganizationImpl->GetLogoPath(); } void Organization::SetName(const String& name) { __pOrganizationImpl->SetName(name); } void Organization::SetJobTitle(const String& jobTitle) { __pOrganizationImpl->SetJobTitle(jobTitle); } void Organization::SetDepartment(const String& department) { __pOrganizationImpl->SetDepartment(department); } void Organization::SetRole(const String& role) { __pOrganizationImpl->SetRole(role); } void Organization::SetAgent(const String& agent) { __pOrganizationImpl->SetAgent(agent); } void Organization::SetType(OrganizationType type) { __pOrganizationImpl->SetType(type); } void Organization::SetLabel(const String& label) { __pOrganizationImpl->SetLabel(label); } void Organization::SetLocation(const String& location) { __pOrganizationImpl->SetLocation(location); } void Organization::SetDescription(const String& description) { __pOrganizationImpl->SetDescription(description); } void Organization::SetPhoneticName(const String& phoneticName) { __pOrganizationImpl->SetPhoneticName(phoneticName); } result Organization::SetLogo(const String& filePath) { return __pOrganizationImpl->SetLogo(filePath); } }} // Tizen::Social