Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alta
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alta
alta
Commits
b17d8b86
Commit
b17d8b86
authored
May 06, 2014
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made a pass on the document
parent
5329c6e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
sources/core/plugins_manager.h
sources/core/plugins_manager.h
+7
-0
sources/core/ptr.h
sources/core/ptr.h
+14
-2
No files found.
sources/core/plugins_manager.h
View file @
b17d8b86
...
...
@@ -47,6 +47,13 @@ class plugins_manager
static
#endif
function
*
get_function
(
const
arguments
&
args
)
;
//! \brief get an instance of the function that is defined in the plugin with
//! filename n. Return null if no one exist.
#ifdef USING_STATIC
static
#endif
ptr
<
function
>
get_function
(
const
arguments
&
args
)
;
//! \brief load a function from the ALTA input file.
#ifdef USING_STATIC
...
...
sources/core/ptr.h
View file @
b17d8b86
...
...
@@ -47,18 +47,30 @@ template<class T> class ptr
_counter
->
decrement
();
if
(
_counter
->
value
()
==
0
)
{
delete
_ptr
;
if
(
_ptr
!=
NULL
)
{
delete
_ptr
;
}
delete
_counter
;
}
}
//! Evaluation operator. This operator should be inlined for
//! performance reasons.
inline
T
*
operator
->
()
inline
T
*
operator
->
()
const
{
return
_ptr
;
}
//! Raw acces to the pointer. It is sometimes needed to
inline
T
*
get
()
const
{
return
_ptr
;
}
//! Is the underlying pointer NULL.
inline
bool
is_null
()
const
{
return
_ptr
==
NULL
;
}
private:
T
*
_ptr
;
ptr_counter
*
_counter
;
...
...
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