DumontEXE 0.0.1
cmcConnectionDef.cpp
00001 /* ***************************************************************************
00002 **
00003 ** Copyright (C) 2007 Lorimark Solutions, LLC. All rights reserved.
00004 **
00005 ** This file is part of the DumontEXE Scripting Extension Kit
00006 **
00007 ** This file may be used under the terms of the GNU General Public
00008 ** License version 2.0 as published by the Free Software Foundation
00009 ** and appearing in the file LICENSE.GPL included in the packaging of
00010 ** this file.  Please review the following information to ensure GNU
00011 ** General Public Licensing requirements will be met:
00012 ** http://dumont.showoff-db.org/opensource.html
00013 **
00014 ** If you are unsure which license is appropriate for your use, please
00015 ** review the following information:
00016 ** http://dumont.showoff-db.org/licensing.html 
00017 ** or contact the sales department at sales@lorimarksolutions.com.
00018 **
00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021 **
00022 ** author: Mark Petryk ~ Lorimark Solutions, LLC
00023 ** **************************************************************************/
00024 
00025 #include <QObject>
00026 #include <QVariant>
00027 
00028 #include "cmcDatabase.h"
00029 #include "cmcCategoryDef.h"
00030 #include "cmcCategoryDefs.h"
00031 #include "cmcConnectionDef.h"
00032 #include "cmcConnectionDefs.h"
00033 
00034 namespace cmcDatabaseApi {
00035 
00036 
00037 cmcConnectionDef::cmcConnectionDef( const cmcConnectionDef & copy ):
00038   cmcObject( copy )
00039 {
00040  
00041 }
00042 
00043 cmcConnectionDef::cmcConnectionDef
00044 (
00045   const QString & conCatName,
00046   cmcConnectionDefs * parent
00047 ):
00048   cmcObject( conCatName, parent-> app(), parent )
00049 {
00050   QStringList cc = conCatName.split(CONCAT_DELIMITER);
00051 
00052   if( cc.count() > 0 )
00053   {
00054     m_conName    = cc[0];
00055     m_toCategory = cc[1];
00056   }
00057 }
00058 
00059 
00060 cmcConnectionDef::cmcConnectionDef
00061 (
00062   const QString & conName,
00063   const QString & toCategory,
00064   cmcConnectionDefs * parent
00065 ):
00066   cmcObject( conName + CONCAT_DELIMITER + toCategory, parent-> app(), parent )
00067 {
00068   m_conName    = conName;
00069   m_toCategory = toCategory;
00070 
00071 //  TRACE_FUNCTION
00072 
00073 }
00074 
00075 
00076 cmcConnectionDef::~cmcConnectionDef()
00077 {
00078 //  TRACE_FUNCTION
00079 }
00080 
00081 cmcConnectionDefs * cmcConnectionDef::connectionDefs()
00082 {
00083   return( qobject_cast<cmcConnectionDefs*>(parent()) );
00084 }
00085 
00086 cmcCategoryDef * cmcConnectionDef::categoryDef()
00087 {
00088   return( connectionDefs()-> categoryDef() );
00089 }
00090 
00091 cmcCategoryDef * cmcConnectionDef::toCategoryDef()
00092 {
00093   return( app()-> categoryDefs()-> get( toCategory() ) );
00094 }
00095 
00096 QString cmcConnectionDef::toCategory()
00097 {
00098   return( m_toCategory );
00099 }
00100 
00101 QString cmcConnectionDef::conName()
00102 {
00103   return( m_conName );
00104 }
00105 
00106 QString cmcConnectionDef::pairedName()
00107 {
00108   return( property( "pairedName","" ).toString() );
00109 }
00110 
00111 void cmcConnectionDef::setPairedName( const QString & value )
00112 {
00113   setProperty( "pairedName", value );
00114 }
00115 
00116 } // endnamespace Commence
00117 
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com