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
solverstack
vite
Commits
871a9428
Commit
871a9428
authored
Feb 12, 2009
by
Johnny Jazeix
Browse files
Ajout de commentaires pour la doc et correction d'erreurs.
parent
b57b0db4
Changes
20
Hide whitespace changes
Inline
Side-by-side
parser/src/Definition.hpp
View file @
871a9428
...
...
@@ -33,7 +33,7 @@ private:
int
typetoint
(
std
::
string
);
/*!
* \fn valid_type(std::string &type_name)
* \fn
is_
valid_type(
const
std::string &type_name)
const
* \brief Check if the type_name is a real type.
* \param name : the name we want to check.
* \return true if the type exists.
...
...
@@ -68,8 +68,8 @@ public:
/*!
* \fn print()
\
* \brief
: print() :
display the definitions
* \fn print()
const
* \brief display the definitions
*
*/
void
print
()
const
;
...
...
parser/src/Parser.hpp
View file @
871a9428
...
...
@@ -13,8 +13,8 @@ class Parser{
public:
/*!
* \fn parse(std::string filename, Trace &trace) = 0
* \param
:
the name of the file to parse
* \param
:
the structure of data to fill
* \param
filename
the name of the file to parse
* \param
trace
the structure of data to fill
*/
virtual
void
parse
(
std
::
string
filename
,
Trace
&
trace
)
=
0
;
virtual
~
Parser
()
{};
...
...
parser/src/ParserDefinitionDecoder.hpp
View file @
871a9428
...
...
@@ -60,15 +60,15 @@ public:
/*!
* \fn enter_definition(Line &line)
* \param line
:
line
* \param line line
*/
void
enter_definition
(
Line
&
line
);
/*!
* \fn leave_definition(Line&line)
* \param
:
line
* \param line
*/
void
leave_definition
(
Line
&
line
);
void
leave_definition
(
Line
&
line
);
/*!
* \fn add_field_to_definition(std::string& first_token, Line& line)
...
...
parser/src/ParserPaje.hpp
View file @
871a9428
...
...
@@ -3,14 +3,12 @@
#include <iostream>
#include <fstream>
//#include <cstdlib>
#include <string>
#include "ParserDefinitionDecoder.hpp"
#include "ParserEventDecoder.hpp"
#include "Parser.hpp"
#include "
../src/
Line.hpp"
#include "Line.hpp"
#include "../../trace/src/Trace.hpp"
//#include "../tests/stub/trace.hpp"
/*!
*
...
...
trace/src/Container.hpp
View file @
871a9428
#ifndef CONTAINER_HPP
#define CONTAINER_HPP
/*!
*
* \file
c
ontainer.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class Container
* \date 2009 January 30th
*
*/
#include <list>
using
std
::
list
;
#include "values/Name.hpp"
#include "values/Date.hpp"
#include "ContainerType.hpp"
class
Container
;
#ifndef CONTAINER_HPP
#define CONTAINER_HPP
/*!
*
* \file
C
ontainer.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class Container
* \date 2009 January 30th
*
*/
#include <list>
using
std
::
list
;
#include "values/Name.hpp"
#include "values/Date.hpp"
#include "ContainerType.hpp"
class
Container
;
#include "State.hpp"
#include "StateType.hpp"
#include "EntityValue.hpp"
#include "EntityList.hpp"
#include "EntityValue.hpp"
#include "EntityList.hpp"
#define STATE_STACK_SIZE 16
#define STATE_STACK_SIZE 16
/*!
*
* \class Container
* \brief contains others containers or entities
*
*/
class
Container
{
friend
class
State
;
private:
Name
_name
;
Date
_creation_time
,
_destruction_time
;
ContainerType
*
_type
;
Container
*
_parent
;
list
<
Container
*>
_children
;
/*!
*
* \class Container
* \brief contains others containers or entities
*
*/
class
Container
{
friend
class
State
;
private:
Name
_name
;
Date
_creation_time
,
_destruction_time
;
ContainerType
*
_type
;
Container
*
_parent
;
list
<
Container
*>
_children
;
EntityList
*
_states
;
struct
state_stack_t
{
struct
current_state_t
{
...
...
@@ -49,106 +49,106 @@ private:
EntityValue
*
value
;
}
states
[
STATE_STACK_SIZE
];
int
index
;
}
_state_stack
;
}
_state_stack
;
void
add_current_state
(
Date
end
);
public:
Container
(
Name
&
name
,
Date
&
creation_time
,
ContainerType
*
type
,
Container
*
parent
);
~
Container
();
public:
Container
(
Name
&
name
,
Date
&
creation_time
,
ContainerType
*
type
,
Container
*
parent
);
~
Container
();
/*!
*
* \fn add_child
* \fn add_child
(Container *)
*
*/
void
add_child
(
Container
*
);
/*!
*
* \fn set_state
* \fn set_state
(Date time, StateType *type, EntityValue *value)
*
*/
void
set_state
(
Date
time
,
StateType
*
type
,
EntityValue
*
value
);
/*!
*
* \fn push_state
* \fn push_state
(Date time, StateType *type, EntityValue *value)
*
*/
void
push_state
(
Date
time
,
StateType
*
type
,
EntityValue
*
value
);
/*!
*
* \fn pop_state
* \fn pop_state
(Date time)
*
*/
void
pop_state
(
Date
time
);
/*!
*
* \fn get_name
* \brief Returns the name and the alias of the container
*
*/
Name
get_name
()
const
;
/*!
*
* \fn get_parent
* \brief Returns the parent container
*
*/
const
Container
*
get_parent
()
const
;
/*!
*
* \fn get_type
* \brief Returns the type of the container
*
*/
const
ContainerType
*
get_type
()
const
;
/*!
*
* \fn get_children
* \brief Returns the list of the child containers
*
*/
const
list
<
Container
*>
*
get_children
()
const
;
/*!
*
* \fn get_creation_time
* \brief Returns the time when the container was created
*
*/
Date
get_creation_time
()
const
;
/*!
*
* \fn get_destruction_time
* \brief Returns the time when the container was destroyed
*
*/
Date
get_destruction_time
()
const
;
/*!
*
* \fn get_states
* \brief Returns the list of the states between min and max
*
*/
EntityList
get_states
()
const
;
/*!
*
* \fn destroy
* \brief Sets the destruction time of the container
* \param
dat
e destruction time
*
*/
void
destroy
(
const
Date
&
time
);
};
#endif
/*!
*
* \fn get_name
() const
* \brief Returns the name and the alias of the container
*
*/
Name
get_name
()
const
;
/*!
*
* \fn get_parent
() const
* \brief Returns the parent container
*
*/
const
Container
*
get_parent
()
const
;
/*!
*
* \fn get_type
() const
* \brief Returns the type of the container
*
*/
const
ContainerType
*
get_type
()
const
;
/*!
*
* \fn get_children
() const
* \brief Returns the list of the child containers
*
*/
const
list
<
Container
*>
*
get_children
()
const
;
/*!
*
* \fn get_creation_time
() const
* \brief Returns the time when the container was created
*
*/
Date
get_creation_time
()
const
;
/*!
*
* \fn get_destruction_time
() const
* \brief Returns the time when the container was destroyed
*
*/
Date
get_destruction_time
()
const
;
/*!
*
* \fn get_states
() const
* \brief Returns the list of the states between min and max
*
*/
EntityList
get_states
()
const
;
/*!
*
* \fn destroy
(const Date &time)
* \brief Sets the destruction time of the container
* \param
tim
e destruction time
*
*/
void
destroy
(
const
Date
&
time
);
};
#endif
trace/src/ContainerType.hpp
View file @
871a9428
...
...
@@ -8,7 +8,7 @@ using std::list;
/*!
*
* \file
c
ontainer
t
ype.hpp
* \file
C
ontainer
T
ype.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class Container
* \date 2009 January 30th
...
...
@@ -36,7 +36,7 @@ public:
/*!
*
* \fn get_parent
* \fn get_parent
() const
* \brief Returns the parent container type
*
*/
...
...
@@ -44,7 +44,7 @@ public:
/*!
*
* \fn get_children
* \fn get_children
() const
* \brief Returns the list of the child container types
*
*/
...
...
trace/src/Entity.hpp
View file @
871a9428
...
...
@@ -3,7 +3,7 @@
/*!
*
* \file
container
.hpp
* \file
Entity
.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class Container
* \date 2009 January 30th
...
...
trace/src/EntityList.hpp
View file @
871a9428
...
...
@@ -20,7 +20,7 @@ private:
public:
/*!
*
*\fn
StructureChained
()
*\fn
EntityList
()
*\brief Constructeur with an element
*
*/
...
...
@@ -28,7 +28,7 @@ public:
/*!
*
* \fn is_empty
* \fn is_empty
() const
* \return true if the list is empty
*
*/
...
...
@@ -52,7 +52,7 @@ public:
/*!
*
*\fn insert_
entity_after(
)
*\fn insert_
after(const Entity *cont
)
*\brief add an entity at the current position in the list
*
*/
...
...
@@ -61,7 +61,7 @@ public:
/*!
*
*\fn remove_ent
ity
()
*\fn remove_
curr
ent()
*\brief Remove the current entity
*
*/
...
...
@@ -77,7 +77,7 @@ public:
/*!
*
*\fn has_next()
()
*\fn has_next()
const
*\brief Return if there is a following element
*
*/
...
...
@@ -85,15 +85,15 @@ public:
/*!
*
*\fn
return the previous element
*\brief Return
if there is a
previous element
*\fn
previous()
*\brief Return
the
previous element
*
*/
void
previous
();
/*!
*
*\fn has_previous()
()
*\fn has_previous()
const
*\brief Return if there is a previous element
*
*/
...
...
@@ -101,7 +101,7 @@ public:
/*!
*
*\fn get_entity()
*\fn get_
current_
entity()
const
*\brief Returns the current entity
*
*/
...
...
trace/src/EntityType.hpp
View file @
871a9428
...
...
@@ -31,7 +31,7 @@ private:
protected:
/*!
*
*\fn EntityType
*\fn EntityType
(Name name, ContainerType *container_type)
*\brief Default constructor
*
*/
...
...
@@ -40,26 +40,32 @@ protected:
public:
/*!
*
* \fn add_value
* \fn add_value
(EntityValue *)
*
*/
void
add_value
(
EntityValue
*
);
/*!
*
* \fn get_name
* \fn get_name
() const
*
*/
Name
get_name
()
const
;
/*!
*
*\fn get_containe
u
r_type
*\fn get_container_type
() const
*\brief Return the type of the container
*
*/
const
ContainerType
*
get_container_type
()
const
;
/*!
*
*\fn get_values() const
*\brief Return a list of the values
*
*/
const
list
<
EntityValue
*>
*
get_values
()
const
;
};
...
...
trace/src/EntityValue.hpp
View file @
871a9428
#ifndef ENTITYVALUE_HPP
#define ENTITYVALUE_HPP
/*!
*
* \file
e
ntity
v
alue.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class EntityValue
* \date 2009 January 30th
*
*/
#ifndef ENTITYVALUE_HPP
#define ENTITYVALUE_HPP
/*!
*
* \file
E
ntity
V
alue.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class EntityValue
* \date 2009 January 30th
*
*/
class
EntityValue
;
#include "EntityType.hpp"
/*!
*
* \class EntityValue
* \brief describe the value of an entity
*
*/
#include "EntityType.hpp"
/*!
*
* \class EntityValue
* \brief describe the value of an entity
*
*/
class
EntityValue
{
private:
Name
_name
;
EntityType
*
_type
;
public:
EntityValue
(
const
Name
&
name
,
EntityType
*
type
);
Name
get_name
()
const
;
const
EntityType
*
get_type
()
const
;
};
#endif
public:
EntityValue
(
const
Name
&
name
,
EntityType
*
type
);
Name
get_name
()
const
;
const
EntityType
*
get_type
()
const
;
};
#endif
trace/src/State.hpp
View file @
871a9428
...
...
@@ -3,7 +3,7 @@
/*!
*
* \file
s
tate.hpp
* \file
S
tate.hpp
* \author Clément Vuchener
* \brief
* \date 2009 January 30th
...
...
@@ -46,7 +46,7 @@ public:
/*!
*
* \fn get_end_time
* \fn get_end_time
() const
* \brief Returns the end time of the state
*
*/
...
...
@@ -54,7 +54,7 @@ public:
/*!
*
* \fn get_duration
* \fn get_duration
() const
* \brief Returns the duration of the state
*
*/
...
...
@@ -62,7 +62,7 @@ public:
/*!
*
* \fn get_type
* \fn get_type
() const
* \brief Returns the type of the state
*
*/
...
...
@@ -70,7 +70,7 @@ public:
/*!
*
* \fn get_value
* \fn get_value
() const
* \brief Returns the value of the state
*
*/
...
...
trace/src/Trace.hpp
View file @
871a9428
...
...
@@ -57,8 +57,8 @@ public :
*\fn define_container_type(Name alias, ContainerType *container_type_parent, const vector<Value> &opt)
*\brief This function is to define a container type
*
*\param
String :
the type of his parent container
*\param
Name :
an object that can contain a name, an alias or both
*\param
alias
the type of his parent container
*\param
container_type_parent
an object that can contain a name, an alias or both
*
*/
void
define_container_type
(
Name
alias
,
ContainerType
*
container_type_parent
,
const
vector
<
Value
>
&
opt
);
...
...
@@ -82,9 +82,9 @@ public :
*\fn destroy_container(Date time, Container *cont, ContainerType *type, const vector<Value> &opt)
*\brief This function is to destroy a container
*
*\param
Date :
When the container is destroyed
*\param
Name :
an object that can contain a name, an alias or both
*\param
Sring :
the type of the container
*\param
time
When the container is destroyed
*\param
cont
an object that can contain a name, an alias or both
*\param
type
the type of the container
*
*/
void
destroy_container
(
Date
time
,
Container
*
cont
,
ContainerType
*
type
,
const
vector
<
Value
>
&
opt
);
...
...
@@ -95,8 +95,8 @@ public :
*\fn define_event_type(Name alias, ContainerType *container_type, const vector<Value> &opt)
*\brief This function is to define a type of event
*
*\param
Name :
an object that can contain a name, an alias or both
*\param
String :
the type of the container
*\param
alias
an object that can contain a name, an alias or both
*\param
container_type
the type of the container
*
*/
void
define_event_type
(
Name
alias
,
ContainerType
*
container_type
,
const
vector
<
Value
>
&
opt
);
...
...
@@ -107,8 +107,8 @@ public :
*\fn define_state_type(Name alias, ContainerType *container_type, const vector<Value> &opt)
*\brief This function is to define a type of state
*
*\param
Name :
an object that can contain a name, an alias or both
*\param
String :
the type of the container
*\param
alias
an object that can contain a name, an alias or both
*\param
container_type
the type of the container
*
*
*/
...
...
@@ -120,8 +120,8 @@ public :
*\fn define_variable_type(Name alias, ContainerType *container_type, const vector<Value> &opt)
*\brief This function is to define a type of variable