Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
041797ae
Commit
041797ae
authored
Aug 11, 2017
by
Ghislain MARY
Browse files
Add ClonableObject base class.
parent
21e6a2b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
0 deletions
+126
-0
src/CMakeLists.txt
src/CMakeLists.txt
+3
-0
src/object/clonable-object-p.h
src/object/clonable-object-p.h
+43
-0
src/object/clonable-object.cpp
src/object/clonable-object.cpp
+35
-0
src/object/clonable-object.h
src/object/clonable-object.h
+45
-0
No files found.
src/CMakeLists.txt
View file @
041797ae
...
...
@@ -30,6 +30,8 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
cpim/parser/cpim-grammar.h
cpim/parser/cpim-parser.h
logger/logger.h
object/clonable-object.h
object/clonable-object-p.h
object/object-p.h
object/object.h
object/singleton.h
...
...
@@ -45,6 +47,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
cpim/parser/cpim-grammar.cpp
cpim/parser/cpim-parser.cpp
logger/logger.cpp
object/clonable-object.cpp
object/object.cpp
utils/utils.cpp
)
...
...
src/object/clonable-object-p.h
0 → 100644
View file @
041797ae
/*
* clonable-object-p.h
* Copyright (C) 2017 Belledonne Communications SARL
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _CLONABLE_OBJECT_P_H_
#define _CLONABLE_OBJECT_P_H_
#include "utils/general.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class
ClonableObject
;
class
ClonableObjectPrivate
{
public:
virtual
~
ClonableObjectPrivate
()
=
default
;
protected:
ClonableObject
*
mPublic
=
nullptr
;
private:
L_DECLARE_PUBLIC
(
ClonableObject
);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _CLONABLE_OBJECT_P_H_
src/object/clonable-object.cpp
0 → 100644
View file @
041797ae
/*
* clonable-object.cpp
* Copyright (C) 2017 Belledonne Communications SARL
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "clonable-object-p.h"
#include "clonable-object.h"
LINPHONE_BEGIN_NAMESPACE
// =============================================================================
ClonableObject
::~
ClonableObject
()
{
delete
mPrivate
;
}
ClonableObject
::
ClonableObject
(
ClonableObjectPrivate
&
p
)
:
mPrivate
(
&
p
)
{
mPrivate
->
mPublic
=
this
;
}
LINPHONE_END_NAMESPACE
src/object/clonable-object.h
0 → 100644
View file @
041797ae
/*
* clonable-object.h
* Copyright (C) 2017 Belledonne Communications SARL
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _CLONABLE_OBJECT_H_
#define _CLONABLE_OBJECT_H_
#include "utils/general.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class
ClonableObjectPrivate
;
class
LINPHONE_PUBLIC
ClonableObject
{
public:
virtual
~
ClonableObject
();
protected:
explicit
ClonableObject
(
ClonableObjectPrivate
&
p
);
ClonableObjectPrivate
*
mPrivate
=
nullptr
;
private:
L_DECLARE_PRIVATE
(
ClonableObject
);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _CLONABLE_OBJECT_H_
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment