Struct CDefinitionContext#
Defined in File definition_generator.h
Inheritance Relationships#
Base Type#
public CDefEntityContext< CDefinitionContext >
(Template Class CDefEntityContext)
Struct Documentation#
-
struct CDefinitionContext : public CDefEntityContext<CDefinitionContext>#
Definition stream context.
Public Functions
-
CDefinitionContext(const CGenContext &rGenContext, sdv::IInterfaceAccess *pEntity)#
Constructor assigning the generator context.
- Parameters:
rGenContext – [in] Reference to the context to assign.
pEntity – [in] Pointer to the definition entity this context belongs to.
-
CDefinitionContext(CDefinitionContext &rcontext, sdv::IInterfaceAccess *pEntity)#
Copy constructor assigning a new definition entity.
- Parameters:
rcontext – [in] Original context to copy from.
pEntity – [in] Pointer to the definition entity this context belongs to.
-
virtual CDefinitionContext &operator<<(const CDefinitionContext &rcontext) override#
Join a context into this context. Overload of CDefEntityContext::operator<<.
- Parameters:
rcontext – [in] Reference to the context to join.
- Returns:
Reference to this context containing the joined result.
-
void SetDefAccessPublic()#
Set the definition access to public (default).
-
void SetDefAccessPrivate()#
Set the definition access to private..
-
std::stringstream &GetPrefaceStream()#
Get a reference to the preface stream.
- Returns:
Reference to the preface stream object.
-
std::stringstream &GetDefCodeStream()#
Get a reference to the definition code stream.
- Returns:
Reference to the definition code stream object.
-
std::stringstream &GetAutoStream()#
Get a reference to the preface or definition code stream dependable on the preface switch.
- Returns:
Reference to the preface or definition code stream object.
-
std::string GetDefinitionCode() const#
Get definition code (this adds both prefacce and definition code stream content).
- Returns:
Returns a string containing the definition code collected within this context.
-
bool UsePreface() const#
Returns whether the preface switch is still activated.
- Returns:
The current state of the preface switch for streaming.
-
void DisablePreface()#
Disable the preface switch.
-
bool NeedsConstruction() const#
Is construction needed?
- Returns:
Returns whether construction is needed.
-
void SetConstructionNeeded()#
Set the construction needed flag.
-
bool NeedsNewlineAfterContent() const#
Newline-after-content-flag set?
- Returns:
Returns whether a newline after the definition content is required.
-
void EnableNewlineAfterContent()#
Set the newline-after-content-flag.
-
void DisableNewlineAfterContent()#
Reset the newline-after-content-flag.
-
bool HasFriends() const#
Dies this entity have any friends?
- Returns:
Returns whether this entity has any friends in the friend set.
-
const std::set<std::string> &GetFriendSet() const#
Get the set of friends.
- Returns:
Returns the reference to the set of friends.
-
void AddFriend(const std::string &rssScopedName)#
Assign a the friend to this entity.
- Parameters:
rssScopedName – [in] Reference to the scoped name of the friend entity.
-
CDefinitionContext(const CGenContext &rGenContext, sdv::IInterfaceAccess *pEntity)#