Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
6db2f221
Commit
6db2f221
authored
Aug 21, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Небольшие правки
parent
38e1bab1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
+12
-11
IOController.h
include/IOController.h
+1
-1
IONotifyController.h
include/IONotifyController.h
+1
-1
NCRestorer.h
include/NCRestorer.h
+1
-1
UInterface.h
include/UInterface.h
+7
-6
UInterface.cc
src/Interfaces/UInterface.cc
+2
-2
No files found.
include/IOController.h
View file @
6db2f221
...
...
@@ -133,7 +133,7 @@ class IOController:
{
return
ioList
.
end
();
}
inline
IOStateList
::
iterator
find
(
UniSetTypes
::
KeyType
k
)
inline
IOStateList
::
iterator
find
(
UniSetTypes
::
ObjectId
k
)
{
return
ioList
.
find
(
k
);
}
...
...
include/IONotifyController.h
View file @
6db2f221
...
...
@@ -268,7 +268,7 @@ class IONotifyController:
};
/*! словарь: аналоговый датчик --> список порогов по нему */
typedef
std
::
unordered_map
<
UniSetTypes
::
KeyType
,
ThresholdsListInfo
>
AskThresholdMap
;
typedef
std
::
unordered_map
<
UniSetTypes
::
ObjectId
,
ThresholdsListInfo
>
AskThresholdMap
;
protected
:
IONotifyController
();
...
...
include/NCRestorer.h
View file @
6db2f221
...
...
@@ -88,7 +88,7 @@ class NCRestorer
ic
->
ioRegistration
(
inf
,
force
);
}
static
inline
IOController
::
IOStateList
::
iterator
ioFind
(
IONotifyController
*
ic
,
UniSetTypes
::
KeyType
k
)
static
inline
IOController
::
IOStateList
::
iterator
ioFind
(
IONotifyController
*
ic
,
UniSetTypes
::
ObjectId
k
)
{
return
ic
->
myiofind
(
k
);
}
...
...
include/UInterface.h
View file @
6db2f221
...
...
@@ -253,7 +253,7 @@ class UInterface
~
CacheOfResolve
()
{};
UniSetTypes
::
ObjectPtr
resolve
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
throw
(
UniSetTypes
::
NameNotFound
);
void
cache
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
,
UniSetTypes
::
ObjectVar
ptr
)
const
;
void
cache
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
,
UniSetTypes
::
ObjectVar
&
ptr
)
const
;
void
erase
(
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
;
inline
void
setMaxSize
(
size_t
ms
)
...
...
@@ -273,21 +273,21 @@ class UInterface
mcache
.
clear
();
};
struct
I
nfo
struct
I
tem
{
I
nfo
(
const
UniSetTypes
::
ObjectVar
&
ptr
)
:
ptr
(
ptr
),
ncall
(
0
)
{}
I
nfo
()
:
ptr
(
NULL
),
ncall
(
0
)
{}
I
tem
(
const
UniSetTypes
::
ObjectVar
&
ptr
)
:
ptr
(
ptr
),
ncall
(
0
)
{}
I
tem
()
:
ptr
(
NULL
),
ncall
(
0
)
{}
UniSetTypes
::
ObjectVar
ptr
;
size_t
ncall
;
// счётчик обращений
bool
operator
<
(
const
CacheOfResolve
::
I
nfo
&
rhs
)
const
bool
operator
<
(
const
CacheOfResolve
::
I
tem
&
rhs
)
const
{
return
this
->
ncall
>
rhs
.
ncall
;
}
};
typedef
std
::
unordered_map
<
int
,
Info
>
CacheMap
;
typedef
std
::
unordered_map
<
UniSetTypes
::
KeyType
,
Item
>
CacheMap
;
mutable
CacheMap
mcache
;
mutable
UniSetTypes
::
uniset_rwmutex
cmutex
;
size_t
MaxSize
;
/*!< максимальный размер кэша */
...
...
@@ -295,6 +295,7 @@ class UInterface
};
void
initBackId
(
UniSetTypes
::
ObjectId
backid
);
protected
:
std
::
string
set_err
(
const
std
::
string
&
pre
,
const
UniSetTypes
::
ObjectId
id
,
const
UniSetTypes
::
ObjectId
node
)
const
;
...
...
src/Interfaces/UInterface.cc
View file @
6db2f221
...
...
@@ -1128,7 +1128,7 @@ throw(NameNotFound)
throw
UniSetTypes
::
NameNotFound
();
}
// ------------------------------------------------------------------------------------------------------------
void
UInterface
::
CacheOfResolve
::
cache
(
const
ObjectId
id
,
const
ObjectId
node
,
ObjectVar
ptr
)
const
void
UInterface
::
CacheOfResolve
::
cache
(
const
ObjectId
id
,
const
ObjectId
node
,
ObjectVar
&
ptr
)
const
{
UniSetTypes
::
uniset_rwmutex_wrlock
l
(
cmutex
);
...
...
@@ -1137,7 +1137,7 @@ void UInterface::CacheOfResolve::cache( const ObjectId id, const ObjectId node,
auto
it
=
mcache
.
find
(
k
);
if
(
it
==
mcache
.
end
()
)
mcache
.
emplace
(
k
,
I
nfo
(
ptr
));
mcache
.
emplace
(
k
,
I
tem
(
ptr
));
else
{
it
->
second
.
ptr
=
ptr
;
// CORBA::Object::_duplicate(ptr);
...
...
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