GME  13
Public Types | Public Member Functions | Public Attributes | Protected Member Functions
OclTree::TreeNode Class Reference

#include <OCLTree.h>

Inheritance diagram for OclTree::TreeNode:
Inheritance graph
[legend]

List of all members.

Public Types

enum  NodeKind {
  NK_OBJECT = 0, NK_COLLECTION = 1, NK_DECLARATION = 2, NK_VARIABLE = 3,
  NK_IFTHENELSE = 4, NK_OPERATOR = 5, NK_FUNCTION = 6, NK_ATTRIBUTE = 7,
  NK_ASSOCIATION = 8, NK_METHOD = 9, NK_ITERATOR = 10, NK_CONTEXT = 11,
  NK_TYPECAST = 12, NK_CONSTRAINT = 13, NK_EXTENSION = 14
}

Public Member Functions

 TreeNode (TreeManager *pManager, NodeKind eKind)
virtual ~TreeNode ()
TreeManager * GetTreeManager () const
NodeKind GetKind () const
virtual std::string Print (const std::string &strTabs) const =0
bool Check (TypeContext &context)
virtual OclMeta::Object Evaluate (ObjectContext &context)=0
bool ParseTypeSeq (TypeContext &context, const Position &position, std::string &strType, TypeSeq &vecType) const
bool CastType (TypeContext &context, const Position &position, const TypeSeq &vecTypeFrom, const TypeSeq &vecTypeTo) const
VariableNode * CreateThis (TypeContext &context, int iImplicitPos) const
int GetLastExceptionCode (TypeContext &context) const
TypeSeq GetParametralTypeSeq (const TypeSeq &vecType1, const TypeSeq &vecType2, const TypeSeq &vecTypeReturn)
OclMeta::Feature * CheckAmbiguity (const std::vector< OclMeta::Type * > &vecTypes, const std::vector< OclSignature::Feature * > &vecSignatures, std::vector< int > &vecAmbiguities, int &iPrecedence, OclCommon::ExceptionPool &exAmbiguity)
void AddViolation (ObjectContext &context, int iLine, const std::string &strSignature, const std::string &strMessage="")
void AddViolation (ObjectContext &context, Violation &violation)
bool IsBooleanReturned ()
OclMeta::Object CheckFalseResult (ObjectContext &context, OclMeta::Object spObject, int iLine, const std::string &strSignature)
OclMeta::Object EvaluateCast (ObjectContext &context, OclMeta::Object spObject, int iLine, const std::string &strSignature, const std::string &strTypeName="", bool bOnlyTest=true)

Public Attributes

TypeSeq m_vecType
PositionMap m_mapPositions
bool m_bTester
bool m_bSelfTester

Protected Member Functions

virtual void CheckInitialize ()
virtual bool CheckImplementation (TypeContext &context)=0

Detailed Description

Definition at line 127 of file OCLTree.h.


Member Enumeration Documentation

Enumerator:
NK_OBJECT 
NK_COLLECTION 
NK_DECLARATION 
NK_VARIABLE 
NK_IFTHENELSE 
NK_OPERATOR 
NK_FUNCTION 
NK_ATTRIBUTE 
NK_ASSOCIATION 
NK_METHOD 
NK_ITERATOR 
NK_CONTEXT 
NK_TYPECAST 
NK_CONSTRAINT 
NK_EXTENSION 

Definition at line 129 of file OCLTree.h.


Constructor & Destructor Documentation

OclTree::TreeNode::TreeNode ( TreeManager *  pManager,
NodeKind  eKind 
)

Definition at line 71 of file OCLTree.cpp.

Definition at line 76 of file OCLTree.cpp.


Member Function Documentation

void OclTree::TreeNode::AddViolation ( ObjectContext &  context,
int  iLine,
const std::string &  strSignature,
const std::string &  strMessage = "" 
)

Definition at line 289 of file OCLTree.cpp.

void OclTree::TreeNode::AddViolation ( ObjectContext &  context,
Violation &  violation 
)

Definition at line 326 of file OCLTree.cpp.

bool OclTree::TreeNode::CastType ( TypeContext &  context,
const Position &  position,
const TypeSeq &  vecTypeFrom,
const TypeSeq &  vecTypeTo 
) const

Definition at line 127 of file OCLTree.cpp.

Definition at line 378 of file OCLTree.cpp.

OclMeta::Feature * OclTree::TreeNode::CheckAmbiguity ( const std::vector< OclMeta::Type * > &  vecTypes,
const std::vector< OclSignature::Feature * > &  vecSignatures,
std::vector< int > &  vecAmbiguities,
int &  iPrecedence,
OclCommon::ExceptionPool &  exAmbiguity 
)

Definition at line 205 of file OCLTree.cpp.

OclMeta::Object OclTree::TreeNode::CheckFalseResult ( ObjectContext &  context,
OclMeta::Object  spObject,
int  iLine,
const std::string &  strSignature 
)

Definition at line 340 of file OCLTree.cpp.

virtual bool OclTree::TreeNode::CheckImplementation ( TypeContext &  context) [protected, pure virtual]
void OclTree::TreeNode::CheckInitialize ( ) [protected, virtual]
VariableNode * OclTree::TreeNode::CreateThis ( TypeContext &  context,
int  iImplicitPos 
) const

Definition at line 188 of file OCLTree.cpp.

virtual OclMeta::Object OclTree::TreeNode::Evaluate ( ObjectContext &  context) [pure virtual]
OclMeta::Object OclTree::TreeNode::EvaluateCast ( ObjectContext &  context,
OclMeta::Object  spObject,
int  iLine,
const std::string &  strSignature,
const std::string &  strTypeName = "",
bool  bOnlyTest = true 
)

Definition at line 352 of file OCLTree.cpp.

Definition at line 85 of file OCLTree.cpp.

Definition at line 199 of file OCLTree.cpp.

TypeSeq OclTree::TreeNode::GetParametralTypeSeq ( const TypeSeq &  vecType1,
const TypeSeq &  vecType2,
const TypeSeq &  vecTypeReturn 
)

Definition at line 140 of file OCLTree.cpp.

Definition at line 80 of file OCLTree.cpp.

Definition at line 335 of file OCLTree.cpp.

bool OclTree::TreeNode::ParseTypeSeq ( TypeContext &  context,
const Position &  position,
std::string &  strType,
TypeSeq &  vecType 
) const

Definition at line 90 of file OCLTree.cpp.

virtual std::string OclTree::TreeNode::Print ( const std::string &  strTabs) const [pure virtual]

Member Data Documentation

Definition at line 136 of file OCLTree.h.

Definition at line 135 of file OCLTree.h.

Definition at line 134 of file OCLTree.h.

Definition at line 133 of file OCLTree.h.


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