Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CDrawingExtractor Class Reference

#include <extract.h>

Collaboration diagram for CDrawingExtractor:
Collaboration graph

Classes

struct  SPoint
 2D coordinates in visio internal units, having [0,0] bottom left More...
 
struct  SStrictOrder
 

Public Member Functions

 CDrawingExtractor (CReportView *reporter)
 
MscPtr extract_msc (Visio::IVPagePtr vsoPage)
 extracts drawing at a given page More...
 

Public Attributes

bool m_remove_extracted
 

Protected Types

enum  TConnectedSide {
  CS_ERROR = 0, CS_SHAPE_TOP, CS_SHAPE_BOTTOM, CS_SHAPE_LEFT,
  CS_SHAPE_RIGHT, CS_WHOLE_SHAPE
}
 
enum  TConnectDirection { CD_ERROR = 0, CD_INCOMING, CD_OUTGOING, CD_UNKNOWN }
 
enum  TTimeDirection { TD_ERROR = 0, TD_TOP, TD_BOTTOM }
 
typedef std::map< _bstr_t, MscPtrMscCacheMap
 
typedef std::map< SPoint,
EventPtr
EventPointMap
 
typedef std::map< long,
MscElementPtr
MscElementMap
 
typedef std::map< long,
MscMessagePtr
MscMessageMap
 
typedef std::map< long,
TimeRelationEventPtr
TimeRelationEventMap
 
typedef std::map< long,
TimeRelationRefNodePtr
TimeRelationRefNodeMap
 

Protected Member Functions

MscPtr __extract_msc (Visio::IVDocumentPtr vsoDocument, const wchar_t *name)
 extracts drawing with given name in a given document More...
 
MscPtr __extract_msc (Visio::IVPagePtr vsoPage)
 extracts drawing at a given page More...
 
void PrintError (const std::wstring &message, const std::vector< _bstr_t > &references=std::vector< _bstr_t >())
 
void PrintWarning (const std::wstring &message, const std::vector< _bstr_t > &references=std::vector< _bstr_t >())
 
SPoint get_connect_point (Visio::IVConnectPtr connect)
 get coordinates of the given Connect element More...
 
SPoint get_conpoint_order (Visio::IVShapePtr coregion, Visio::IVConnectPtr connect)
 
SPoint point_to_page (Visio::IVShapePtr shape, const SPoint &point)
 
Coordinate ConvertCoordinate (Visio::IVShapePtr shape, double val) const
 
MscPoint ConvertEventPoint (Visio::IVShapePtr shape, const SPoint &point) const
 
Coordinate GetWidth (Visio::IVShapePtr shape)
 
Coordinate GetHeight (Visio::IVShapePtr shape)
 
Coordinate GetControlPos (Visio::IVShapePtr shape, const wchar_t *row)
 
void assert_no_nested_FromConnects (Visio::IVShapePtr shape)
 assert the given shape has no connections to its sub-shapes More...
 
void assert_no_FromConnects (Visio::IVShapePtr shape)
 
template<class M >
boost::intrusive_ptr< M > find_element (const MscElementMap &elements, long id)
 
CoregionAreaPtr create_coregion_area (EventPointMap &events, const MscElementMap &elements, Visio::IVShapePtr coregion)
 process the given coregion and build a relevant CoregionArea More...
 
InstancePtr new_instance_ptr (Visio::IVShapePtr shape)
 
InstancePtr new_instance_ptr (Visio::IVShapePtr shape, MscColor color)
 
BMscPtr extract_bmsc (Visio::IVPagePtr vsoPage)
 process the given page and build a relevant BMsc More...
 
TConnectedSide get_connected_side (Visio::IVConnectPtr connect)
 Differentiates between top and bottom connections. More...
 
TConnectDirection get_connect_direction (Visio::IVConnectPtr connect)
 Determines a type of connection represented by the given Connect. More...
 
TTimeDirection get_time_direction (Visio::IVConnectPtr connect)
 
void set_as_predecessor (const NodeRelationPtr &relation, Visio::IVShapePtr shape, const HMscNodePtr &node)
 sets given shape/node as a predecessor in the given relation More...
 
void set_as_successor (const NodeRelationPtr &relation, Visio::IVShapePtr shape, const HMscNodePtr &node)
 sets given shape/node as a successor in the given relation More...
 
HMscPtr extract_hmsc (Visio::IVPagePtr vsoPage)
 process the given page and build a relevant HMsc More...
 

Protected Attributes

CReportViewm_reporter
 remove the extracted objects; useful for transformers More...
 
bool m_was_error
 
MscCacheMap m_msc_cache
 

Detailed Description

Definition at line 78 of file extract.h.

Member Typedef Documentation

typedef std::map<SPoint,EventPtr> CDrawingExtractor::EventPointMap
protected

Definition at line 173 of file extract.h.

typedef std::map<_bstr_t,MscPtr > CDrawingExtractor::MscCacheMap
protected

Definition at line 117 of file extract.h.

typedef std::map<long,MscElementPtr> CDrawingExtractor::MscElementMap
protected

Definition at line 175 of file extract.h.

typedef std::map<long,MscMessagePtr> CDrawingExtractor::MscMessageMap
protected

Definition at line 176 of file extract.h.

Definition at line 177 of file extract.h.

Definition at line 178 of file extract.h.

Member Enumeration Documentation

Enumerator
CD_ERROR 
CD_INCOMING 
CD_OUTGOING 
CD_UNKNOWN 

Definition at line 236 of file extract.h.

Enumerator
CS_ERROR 
CS_SHAPE_TOP 
CS_SHAPE_BOTTOM 
CS_SHAPE_LEFT 
CS_SHAPE_RIGHT 
CS_WHOLE_SHAPE 

Definition at line 224 of file extract.h.

Enumerator
TD_ERROR 
TD_TOP 
TD_BOTTOM 

Definition at line 246 of file extract.h.

Constructor & Destructor Documentation

CDrawingExtractor::CDrawingExtractor ( CReportView reporter)
inline

Definition at line 81 of file extract.h.

References m_remove_extracted, m_reporter, and m_was_error.

Member Function Documentation

MscPtr CDrawingExtractor::__extract_msc ( Visio::IVDocumentPtr  vsoDocument,
const wchar_t *  name 
)
protected

extracts drawing with given name in a given document

Definition at line 99 of file extract.cpp.

Referenced by extract_hmsc(), and extract_msc().

MscPtr CDrawingExtractor::__extract_msc ( Visio::IVPagePtr  vsoPage)
protected

extracts drawing at a given page

Definition at line 113 of file extract.cpp.

References DT_BMSC, DT_HMSC, extract_bmsc(), extract_hmsc(), get_drawing_type(), m_msc_cache, PrintError(), and TRACE.

void CDrawingExtractor::assert_no_FromConnects ( Visio::IVShapePtr  shape)
protected

Definition at line 413 of file extract.cpp.

References PrintWarning().

Referenced by assert_no_nested_FromConnects().

void CDrawingExtractor::assert_no_nested_FromConnects ( Visio::IVShapePtr  shape)
protected

assert the given shape has no connections to its sub-shapes

Definition at line 407 of file extract.cpp.

References assert_no_FromConnects().

Referenced by create_coregion_area(), and extract_bmsc().

Coordinate CDrawingExtractor::ConvertCoordinate ( Visio::IVShapePtr  shape,
double  val 
) const
inlineprotected

Definition at line 145 of file extract.h.

Referenced by ConvertEventPoint(), and extract_bmsc().

MscPoint CDrawingExtractor::ConvertEventPoint ( Visio::IVShapePtr  shape,
const SPoint point 
) const
inlineprotected
CoregionAreaPtr CDrawingExtractor::create_coregion_area ( EventPointMap events,
const MscElementMap elements,
Visio::IVShapePtr  coregion 
)
protected
BMscPtr CDrawingExtractor::extract_bmsc ( Visio::IVPagePtr  vsoPage)
protected
HMscPtr CDrawingExtractor::extract_hmsc ( Visio::IVPagePtr  vsoPage)
protected
MscPtr CDrawingExtractor::extract_msc ( Visio::IVPagePtr  vsoPage)
template<class M >
boost::intrusive_ptr<M> CDrawingExtractor::find_element ( const MscElementMap elements,
long  id 
)
inlineprotected

Definition at line 181 of file extract.h.

CDrawingExtractor::TConnectDirection CDrawingExtractor::get_connect_direction ( Visio::IVConnectPtr  connect)
protected
CDrawingExtractor::SPoint CDrawingExtractor::get_connect_point ( Visio::IVConnectPtr  connect)
protected
CDrawingExtractor::TConnectedSide CDrawingExtractor::get_connected_side ( Visio::IVConnectPtr  connect)
protected
CDrawingExtractor::SPoint CDrawingExtractor::get_conpoint_order ( Visio::IVShapePtr  coregion,
Visio::IVConnectPtr  connect 
)
protected
CDrawingExtractor::TTimeDirection CDrawingExtractor::get_time_direction ( Visio::IVConnectPtr  connect)
protected
Coordinate CDrawingExtractor::GetControlPos ( Visio::IVShapePtr  shape,
const wchar_t *  row 
)
protected

Definition at line 390 of file extract.cpp.

Referenced by extract_bmsc(), extract_hmsc(), and new_instance_ptr().

Coordinate CDrawingExtractor::GetHeight ( Visio::IVShapePtr  shape)
inlineprotected

Definition at line 161 of file extract.h.

Referenced by extract_bmsc(), and extract_hmsc().

Coordinate CDrawingExtractor::GetWidth ( Visio::IVShapePtr  shape)
inlineprotected

Definition at line 157 of file extract.h.

Referenced by extract_bmsc(), and extract_hmsc().

InstancePtr CDrawingExtractor::new_instance_ptr ( Visio::IVShapePtr  shape)
protected

Definition at line 713 of file extract.cpp.

References get_shape_attribute(), GetControlPos(), GetLineBegin(), GetLineEnd(), and result.

Referenced by extract_bmsc(), and new_instance_ptr().

InstancePtr CDrawingExtractor::new_instance_ptr ( Visio::IVShapePtr  shape,
MscColor  color 
)
protected

Definition at line 706 of file extract.cpp.

References new_instance_ptr(), and result.

CDrawingExtractor::SPoint CDrawingExtractor::point_to_page ( Visio::IVShapePtr  shape,
const SPoint point 
)
protected
void CDrawingExtractor::PrintError ( const std::wstring &  message,
const std::vector< _bstr_t > &  references = std::vector<_bstr_t>() 
)
inlineprotected
void CDrawingExtractor::PrintWarning ( const std::wstring &  message,
const std::vector< _bstr_t > &  references = std::vector<_bstr_t>() 
)
inlineprotected

Definition at line 110 of file extract.h.

References m_reporter, CReportView::Print(), and RS_WARNING.

Referenced by assert_no_FromConnects(), extract_bmsc(), and extract_hmsc().

void CDrawingExtractor::set_as_predecessor ( const NodeRelationPtr relation,
Visio::IVShapePtr  shape,
const HMscNodePtr node 
)
protected

sets given shape/node as a predecessor in the given relation

Definition at line 1579 of file extract.cpp.

References get_shape_type(), PrintError(), ST_HMSC_CONNECTION, ST_HMSC_REFERENCE, ST_HMSC_START, ST_MSC_CONDITION, and TRACE.

Referenced by extract_hmsc().

void CDrawingExtractor::set_as_successor ( const NodeRelationPtr relation,
Visio::IVShapePtr  shape,
const HMscNodePtr node 
)
protected

sets given shape/node as a successor in the given relation

Definition at line 1608 of file extract.cpp.

References get_shape_type(), PrintError(), ST_HMSC_CONNECTION, ST_HMSC_END, ST_HMSC_REFERENCE, ST_MSC_CONDITION, and TRACE.

Referenced by extract_hmsc().

Member Data Documentation

MscCacheMap CDrawingExtractor::m_msc_cache
protected

Definition at line 118 of file extract.h.

Referenced by __extract_msc(), extract_bmsc(), extract_hmsc(), and extract_msc().

bool CDrawingExtractor::m_remove_extracted
CReportView* CDrawingExtractor::m_reporter
protected

remove the extracted objects; useful for transformers

Definition at line 95 of file extract.h.

Referenced by CDrawingExtractor(), PrintError(), and PrintWarning().

bool CDrawingExtractor::m_was_error
protected

Definition at line 96 of file extract.h.

Referenced by CDrawingExtractor(), extract_bmsc(), extract_hmsc(), and PrintError().


The documentation for this class was generated from the following files:

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:57 for Sequence Chart Studio by  doxygen