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
aion
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Philip Trettner
aion
Commits
66757b37
Commit
66757b37
authored
Feb 19, 2016
by
Philip Trettner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed some namespaces
parent
5c9abeed
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
64 deletions
+30
-64
src/aion/ActionAnalyzer.cc
src/aion/ActionAnalyzer.cc
+4
-4
src/aion/ActionAnalyzer.hh
src/aion/ActionAnalyzer.hh
+2
-2
src/aion/ActionLabel.hh
src/aion/ActionLabel.hh
+5
-5
src/aion/ActionPackage.hh
src/aion/ActionPackage.hh
+2
-2
src/aion/ActionTree.cc
src/aion/ActionTree.cc
+3
-3
src/aion/ActionTree.hh
src/aion/ActionTree.hh
+3
-3
src/aion/common/NetMessage.hh
src/aion/common/NetMessage.hh
+1
-1
src/aion/common/property.hh
src/aion/common/property.hh
+9
-43
src/aion/common/systime.hh
src/aion/common/systime.hh
+1
-1
No files found.
src/aion/ActionAnalyzer.cc
View file @
66757b37
...
...
@@ -158,13 +158,13 @@ void ActionAnalyzer::dumpSummary(std::ostream &oss, bool verbose)
_
desc
=
l
->
shortDesc
();
oss
<<
" "
<<
desc
<<
std
::
string
(
nameLength
-
desc
.
size
(),
' '
)
<<
" "
;
oss
<<
aion_fmt
::
format
(
cntFmt
,
a
->
count
())
<<
"x "
;
systime
::
formatHuman
(
a
->
averageNS
(),
oss
);
aion_
systime
::
formatHuman
(
a
->
averageNS
(),
oss
);
oss
<<
" ("
;
systime
::
formatHuman
(
a
->
minNS
(),
oss
);
aion_
systime
::
formatHuman
(
a
->
minNS
(),
oss
);
oss
<<
" ~ "
;
systime
::
formatHuman
(
a
->
maxNS
(),
oss
);
aion_
systime
::
formatHuman
(
a
->
maxNS
(),
oss
);
oss
<<
", ±"
;
systime
::
formatHuman
(
a
->
standardDeviationNS
(),
oss
);
aion_
systime
::
formatHuman
(
a
->
standardDeviationNS
(),
oss
);
oss
<<
")
\n
"
;
}
}
...
...
src/aion/ActionAnalyzer.hh
View file @
66757b37
...
...
@@ -41,8 +41,8 @@ private:
int64_t
mMax
;
public:
// properties
GETTER
(
Tree
);
GETTER
(
Actions
);
AION_
GETTER
(
Tree
);
AION_
GETTER
(
Actions
);
int64_t
count
()
const
{
return
mCount
;
}
int64_t
totalTimeNS
()
const
{
return
mSumNs
;
}
...
...
src/aion/ActionLabel.hh
View file @
66757b37
...
...
@@ -21,12 +21,12 @@ private:
int32_t
mIndex
;
public:
GETTER
(
Index
);
AION_
GETTER
(
Index
);
GETTER
(
Name
);
GETTER
(
File
);
GETTER
(
Line
);
GETTER
(
Function
);
AION_
GETTER
(
Name
);
AION_
GETTER
(
File
);
AION_
GETTER
(
Line
);
AION_
GETTER
(
Function
);
std
::
string
shortDesc
()
const
;
...
...
src/aion/ActionPackage.hh
View file @
66757b37
...
...
@@ -23,8 +23,8 @@ private:
std
::
vector
<
ActionLabel
*>
mLabels
;
public:
GETTER
(
Entries
);
GETTER
(
Labels
);
AION_
GETTER
(
Entries
);
AION_
GETTER
(
Labels
);
public:
ActionPackage
(
std
::
vector
<
ActionEntry
>
const
&
entries
,
std
::
vector
<
ActionLabel
*>
const
&
labels
);
...
...
src/aion/ActionTree.cc
View file @
66757b37
...
...
@@ -151,7 +151,7 @@ SharedActionTree ActionTree::construct(const std::vector<ActionEntry> &entries,
static
void
dumpAction
(
std
::
ostream
&
oss
,
Action
*
a
,
std
::
string
const
&
prefix
)
{
oss
<<
prefix
<<
" - "
<<
systime
::
formatHuman
(
a
->
duration
)
<<
" ("
<<
a
->
label
->
nameOrFunc
()
<<
")
\n
"
;
oss
<<
prefix
<<
" - "
<<
aion_
systime
::
formatHuman
(
a
->
duration
)
<<
" ("
<<
a
->
label
->
nameOrFunc
()
<<
")
\n
"
;
_
c
=
a
->
firstChild
;
_
cp
=
prefix
+
" "
;
while
(
c
)
...
...
@@ -163,11 +163,11 @@ static void dumpAction(std::ostream &oss, Action *a, std::string const &prefix)
void
ActionTree
::
dump
(
std
::
ostream
&
oss
)
const
{
_
totalTime
=
0
*
systime
::
ns
;
_
totalTime
=
0
*
aion_
systime
::
ns
;
for
(
_
r
:
mRoots
)
totalTime
+=
r
->
duration
;
oss
<<
"Total Time: "
<<
systime
::
formatHuman
(
totalTime
)
<<
"
\n
"
;
oss
<<
"Total Time: "
<<
aion_
systime
::
formatHuman
(
totalTime
)
<<
"
\n
"
;
for
(
_
r
:
mRoots
)
dumpAction
(
oss
,
r
,
""
);
oss
.
flush
();
...
...
src/aion/ActionTree.hh
View file @
66757b37
...
...
@@ -21,9 +21,9 @@ private:
std
::
vector
<
ActionLabel
*>
mLabels
;
public:
GETTER
(
Actions
);
GETTER
(
Roots
);
GETTER
(
Labels
);
AION_
GETTER
(
Actions
);
AION_
GETTER
(
Roots
);
AION_
GETTER
(
Labels
);
size_t
getActionCount
()
const
{
return
mActions
.
size
();
}
ActionTree
();
...
...
src/aion/common/NetMessage.hh
View file @
66757b37
...
...
@@ -335,7 +335,7 @@ public:
/// Const reference to the internal data
const
std
::
vector
<
char
>
&
getData
()
const
{
return
mData
;
}
GETTER
(
Position
);
AION_
GETTER
(
Position
);
// Supported types:
...
...
src/aion/common/property.hh
View file @
66757b37
...
...
@@ -19,56 +19,22 @@
* CAUTION: these macros can only be used _after_ the member is declared (due to type deduction)
*/
#define GETTER(name) \
#define
AION_
GETTER(name) \
auto get##name() const->decltype(m##name) const & { return m##name; } \
friend class AION_MACRO_JOIN(___get_, __COUNTER__)
#define SETTER(name) \
#define
AION_
SETTER(name) \
void set##name(decltype(m##name) const& value) { m##name = value; } \
friend class AION_MACRO_JOIN(___set_, __COUNTER__)
#define GETTER_IS(name) \
#define
AION_
GETTER_IS(name) \
auto is##name() const->decltype(m##name) const & { return m##name; } \
friend class AION_MACRO_JOIN(___get_is_, __COUNTER__)
#define PROPERTY(name) \
GETTER(name); \
SETTER(name)
#define
AION_
PROPERTY(name) \
AION_
GETTER(name); \
AION_
SETTER(name)
#define PROPERTY_IS(name) \
GETTER_IS(name); \
SETTER(name)
/**
* Qt specific addition
*
* Usage:
*
* Q_OBJECT
* Q_PROPERTY(QString bar READ getBar WRITE setBar NOTIFY onBarChanged)
* private:
* QString mBar;
* public:
* PROPERTY_QML(Bar);
* signals:
* void onBarChanged();
*/
#define SETTER_QML(name) \
void set##name(decltype(m##name) const& value) \
{ \
if (m##name != value) \
{ \
m##name = value; \
emit on##name##Changed(); \
} \
} \
friend class AION_MACRO_JOIN(___set_, __COUNTER__)
#define PROPERTY_QML(name) \
GETTER(name); \
SETTER_QML(name)
#define PROPERTY_QML_IS(name) \
GETTER_IS(name); \
SETTER_QML(name)
#define AION_PROPERTY_IS(name) \
AION_GETTER_IS(name); \
AION_SETTER(name)
src/aion/common/systime.hh
View file @
66757b37
...
...
@@ -10,7 +10,7 @@
/// Contains constants for conversion from ns to other times
/// Examples: 10 * systime::ms are 10ms
namespace
systime
namespace
aion_
systime
{
const
int64_t
h
=
60LL
*
60LL
*
1000LL
*
1000LL
*
1000LL
;
const
int64_t
min
=
60LL
*
1000LL
*
1000LL
*
1000LL
;
...
...
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